From: luozhengzheng Date: Fri, 14 Oct 2016 16:40:08 +0000 (+0800) Subject: Fix coverity defects: CID 150921, 150927 X-Git-Tag: zfs-0.7.0-rc2~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a875c6c5dd1e7cb0dad56d593a428d570ea5111;p=zfs Fix coverity defects: CID 150921, 150927 CID 150921: Unchecked return value (CHECKED_RETURN) CID 150927 : Unchecked return value (CHECKED_RETURN) Reviewed-by: Brian Behlendorf Signed-off-by: luozhengzheng Closes #5267 --- diff --git a/lib/libspl/getexecname.c b/lib/libspl/getexecname.c index 478351ce7..c21a110ad 100644 --- a/lib/libspl/getexecname.c +++ b/lib/libspl/getexecname.c @@ -38,7 +38,7 @@ getexecname(void) char *ptr = NULL; ssize_t rc; - pthread_mutex_lock(&mtx); + (void) pthread_mutex_lock(&mtx); if (strlen(execname) == 0) { rc = readlink("/proc/self/exe", @@ -53,6 +53,6 @@ getexecname(void) ptr = execname; } - pthread_mutex_unlock(&mtx); + (void) pthread_mutex_unlock(&mtx); return (ptr); }