Fix coverity defects: CID 150921, 150927

CID 150921: Unchecked return value (CHECKED_RETURN)
CID 150927 : Unchecked return value (CHECKED_RETURN)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Closes #5267
This commit is contained in:
luozhengzheng 2016-10-15 00:40:08 +08:00 committed by Brian Behlendorf
parent 21237e9167
commit 9a875c6c5d

View File

@ -38,7 +38,7 @@ getexecname(void)
char *ptr = NULL; char *ptr = NULL;
ssize_t rc; ssize_t rc;
pthread_mutex_lock(&mtx); (void) pthread_mutex_lock(&mtx);
if (strlen(execname) == 0) { if (strlen(execname) == 0) {
rc = readlink("/proc/self/exe", rc = readlink("/proc/self/exe",
@ -53,6 +53,6 @@ getexecname(void)
ptr = execname; ptr = execname;
} }
pthread_mutex_unlock(&mtx); (void) pthread_mutex_unlock(&mtx);
return (ptr); return (ptr);
} }