rpc: coverity fixes

CID: [1] 1394646 Unchecked return value from library
CID: [2] 1394633 Unused value
CID:     1382443 Sleeping while holding a lock [This is intentional]

[1] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159112&defectInstanceId=26360786&mergedDefectId=1394646
[2] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159365&defectInstanceId=26360919&mergedDefectId=1394633

Change-Id: I03086f7a9672c9f50a2bc44cdbce0006c887357b
updates: bz#789278
Signed-off-by: Milind Changire <mchangir@redhat.com>
This commit is contained in:
Milind Changire 2018-10-08 21:35:04 +05:30 committed by Raghavendra G
parent b5f75e337c
commit 3108fb24e7
2 changed files with 3 additions and 1 deletions

View File

@ -223,7 +223,7 @@ socket_dump_info(struct sockaddr *sa, int is_server, int is_ssl, int sock,
else
peer_type = "client";
getsockopt(sock, SOL_SOCKET, SO_ERROR, &so_error, &slen);
(void)getsockopt(sock, SOL_SOCKET, SO_ERROR, &so_error, &slen);
gf_log(log_domain, GF_LOG_TRACE,
"$$$ %s: %s (af:%d,sock:%d) %s %s (errno:%d:%s)", peer_type,

View File

@ -916,6 +916,8 @@ fail:
ret = dict_set_str(reply, "ERROR",
"cleanup flag is set for xlator "
"before call first_lookup Try again later");
/* quisce coverity about UNUSED_VALUE ret */
(void)(ret);
} else {
op_ret = server_first_lookup(this, client, reply);
if (op_ret == -1)