* lib/commonio.c: Ignore the return value of umask() when the mask
is set to the old value.
This commit is contained in:
@@ -186,7 +186,7 @@ static FILE *fopen_set_perms (const char *name, const char *mode,
|
||||
|
||||
mask = umask (0777);
|
||||
fp = fopen (name, mode);
|
||||
umask (mask);
|
||||
(void) umask (mask);
|
||||
if (NULL == fp) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -233,7 +233,7 @@ static int create_backup (const char *backup, FILE * fp)
|
||||
|
||||
mask = umask (077);
|
||||
bkfp = fopen (backup, "w");
|
||||
umask (mask);
|
||||
(void) umask (mask);
|
||||
if (NULL == bkfp) {
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user