Add the missing return in plat/osx/libsys/creat.c
authorGeorge Koehler <xkernigh@netscape.net>
Tue, 8 Nov 2016 20:35:02 +0000 (15:35 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Tue, 8 Nov 2016 20:35:02 +0000 (15:35 -0500)
Before now, it might have worked by accident if the return value from
open() stayed in the function return area.

plat/osx/libsys/creat.c

index df2c822..3a350e3 100644 (file)
@@ -2,5 +2,5 @@
 
 int creat(const char *path, mode_t mode)
 {
-       open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
+       return open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
 }