|
@@ -161,7 +161,7 @@ int G_mkstemp(char *template, int flags, int mode)
|
|
|
|
|
|
FILE *G_mkstemp_fp(char *template, int flags, int mode)
|
|
|
{
|
|
|
- const char *fmode = (flags & O_ACCMODE == O_RDWR)
|
|
|
+ const char *fmode = ((flags & O_ACCMODE) == O_RDWR)
|
|
|
? ((flags & O_APPEND) ? "a+" : "w+")
|
|
|
: ((flags & O_APPEND) ? "a" : "w");
|
|
|
int fd = G_mkstemp(template, flags, mode);
|