diff options
Diffstat (limited to 'extension/inplace.c')
-rw-r--r-- | extension/inplace.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/extension/inplace.c b/extension/inplace.c index e2f8b73f..8a7375c4 100644 --- a/extension/inplace.c +++ b/extension/inplace.c @@ -171,9 +171,8 @@ do_inplace_begin(int nargs, awk_value_t *result) /* N.B. chown/chmod should be more portable than fchown/fchmod */ if (chown(state.tname, sbuf.st_uid, sbuf.st_gid) < 0) - /* checking chown here shuts up the compiler. bleah */ - if (chown(state.tname, -1, sbuf.st_gid) < 0) - ; + (void) chown(state.tname, -1, sbuf.st_gid); + if (chmod(state.tname, sbuf.st_mode) < 0) fatal(ext_id, _("inplace_begin: chmod failed (%s)"), strerror(errno)); |