tmpfile: return NULL not randomness on error
authorAlan Cox <alan@linux.intel.com>
Mon, 11 May 2015 20:35:34 +0000 (21:35 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 11 May 2015 20:35:34 +0000 (21:35 +0100)
Library/libs/tmpfile.c

index ca2da44..05eed7c 100644 (file)
@@ -5,7 +5,7 @@ FILE *tmpfile(void)
 {
   int fd = mkstemp("/tmp/tmpfileXXXXXX");
   if (fd == -1)
-    return;
+    return NULL;
   return fdopen(fd, "r+");
 }