From bf25c3a43f79f568b55c45e2701f5c961977b47c Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 15 Mar 2009 01:04:50 +0000 Subject: 26735: Check some function return values for failures. Gets rid of some compiler warnings, and improves error handling/notification. --- Src/hist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src/hist.c') diff --git a/Src/hist.c b/Src/hist.c index 38ceac30a..637976de7 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -2291,9 +2291,9 @@ savehistfile(char *fn, int err, int writeflags) #ifdef HAVE_FCHMOD if (old_exists && out) { #ifdef HAVE_FCHOWN - fchown(fileno(out), sb.st_uid, sb.st_gid); + if (fchown(fileno(out), sb.st_uid, sb.st_gid) < 0) {} /* IGNORE FAILURE */ #endif - fchmod(fileno(out), sb.st_mode); + if (fchmod(fileno(out), sb.st_mode) < 0) {} /* IGNORE FAILURE */ } #endif } -- cgit 1.4.1