diff options
author | Iku <iku@yokattana.com> | 2017-02-09 08:02:11 +0100 |
---|---|---|
committer | Iku <iku@yokattana.com> | 2017-02-09 09:09:31 +0100 |
commit | 895334d111060e805fbbe60b9020f6c32f3b90c5 (patch) | |
tree | d361f38c0da23960884e42191767364bce2d541d /src/file.c | |
parent | 474e05785ad4ecb3b40626093c51e9f69acf9000 (diff) |
Address compiler warnings
(Compiling with GCC 4.8.4 on LXSS/Ubuntu)
- unused results
- incorrect size argument in fgetws
One unused result warning, for dup(), has not been addressed because the
author is not familiar with its use.
Diffstat (limited to 'src/file.c')
-rw-r--r-- | src/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -540,7 +540,10 @@ int backup_file(char *path) { umask(oldumask); if (outfd < 0) return (0); - (void) chown(tpath, statbuf.st_uid, statbuf.st_gid); + + if (!chown(tpath, statbuf.st_uid, statbuf.st_gid)) { + /* not fatal */ + } while ((count = read(infd, buf, sizeof(buf))) > 0) { if (write(outfd, buf, count) != count) { |