From e86f9bcc463370f27f005439c2d8bb73a0caafbd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 8 Oct 2014 10:21:24 +0300 Subject: Minor cleanup in extension/inplace.c. --- extension/inplace.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'extension/inplace.c') 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)); -- cgit v1.2.3