From af4db70f368d0e9c9ad90f0837a77e511a77b0a7 Mon Sep 17 00:00:00 2001 From: cao Date: Wed, 12 Oct 2016 02:32:34 +0800 Subject: Fix coverity defects: CID 147452, 147447, 147446 coverity scan CID:147452, Type:Unchecked return value from library coverity scan CID:147447, Type:Unchecked return value from library coverity scan CID:147446, Type:Unchecked return value from library Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Signed-off-by: cao.xuewen Closes #5264 --- lib/libshare/libshare.c | 2 +- lib/libshare/nfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libshare') diff --git a/lib/libshare/libshare.c b/lib/libshare/libshare.c index ea59dcdbc..89a4fe9aa 100644 --- a/lib/libshare/libshare.c +++ b/lib/libshare/libshare.c @@ -215,7 +215,7 @@ update_sharetab(sa_handle_impl_t impl_handle) fsync(temp_fd); fclose(temp_fp); - rename(tempfile, "/etc/dfs/sharetab"); + (void) rename(tempfile, "/etc/dfs/sharetab"); } typedef struct update_cookie_s { diff --git a/lib/libshare/nfs.c b/lib/libshare/nfs.c index abcc1025b..58b4c8880 100644 --- a/lib/libshare/nfs.c +++ b/lib/libshare/nfs.c @@ -675,7 +675,7 @@ nfs_check_exportfs(void) unlink(nfs_exportfs_tempfile); - fcntl(nfs_exportfs_temp_fd, F_SETFD, FD_CLOEXEC); + (void) fcntl(nfs_exportfs_temp_fd, F_SETFD, FD_CLOEXEC); pid = fork(); -- cgit v1.2.3