Home > Uncategorised > Wow!

Wow!

December 7th, 2005 Leave a comment Go to comments

Jesus! How dodgy is this bit of code?

/*  
  * $Id: clearmem.c,v 1.1 2003/06/29 20:41:33 decibel Exp $
  *
  * Utility to clear out a chunk of memory and zero it. Useful for  flushing disk buffers
  */
int main(int argc, char *argv[]) {
     if (!calloc(atoi(argv[1]), 1024*1024)) { printf("Error allocating memory.
"); }
}

Categories: Uncategorised Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.