aboutsummaryrefslogtreecommitdiffstats
path: root/extension/inplace.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2014-12-14 12:53:35 -0500
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2014-12-14 12:53:35 -0500
commit1fc7a1fe6aba3c1ba98c44f8df1926c10ff79c87 (patch)
treee6eff5ba1ffaa2250c59ce02464d783b08508f4c /extension/inplace.c
parentf9c7ec30542ef2550761f49cd25503e0775ef271 (diff)
parent0d52289482d468c8566976d77c0c6a6a4e602add (diff)
downloadegawk-1fc7a1fe6aba3c1ba98c44f8df1926c10ff79c87.tar.gz
egawk-1fc7a1fe6aba3c1ba98c44f8df1926c10ff79c87.tar.bz2
egawk-1fc7a1fe6aba3c1ba98c44f8df1926c10ff79c87.zip
Merge branch 'master' into select
Diffstat (limited to 'extension/inplace.c')
-rw-r--r--extension/inplace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/extension/inplace.c b/extension/inplace.c
index 8a7375c4..0693ad92 100644
--- a/extension/inplace.c
+++ b/extension/inplace.c
@@ -170,8 +170,12 @@ do_inplace_begin(int nargs, awk_value_t *result)
state.tname, strerror(errno));
/* N.B. chown/chmod should be more portable than fchown/fchmod */
- if (chown(state.tname, sbuf.st_uid, sbuf.st_gid) < 0)
- (void) chown(state.tname, -1, sbuf.st_gid);
+ if (chown(state.tname, sbuf.st_uid, sbuf.st_gid) < 0) {
+ /* jumping through hoops to silence gcc. :-( */
+ int junk;
+ junk = chown(state.tname, -1, sbuf.st_gid);
+ junk = junk;
+ }
if (chmod(state.tname, sbuf.st_mode) < 0)
fatal(ext_id, _("inplace_begin: chmod failed (%s)"),