ed7fb69f79
Before now, it might have worked by accident if the return value from open() stayed in the function return area.
7 lines
121 B
C
7 lines
121 B
C
#include <fcntl.h>
|
|
|
|
int creat(const char *path, mode_t mode)
|
|
{
|
|
return open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
|
|
}
|