From 3062a2585fa7b2d0be8ee4651fa46e0243f8e0d8 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 25 Nov 2013 14:15:17 -0500 Subject: [PATCH] Fix: comparison of unsigned value agains < 0 Signed-off-by: David Goulet --- src/common/relayd/relayd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/relayd/relayd.c b/src/common/relayd/relayd.c index 2283865cf..38735ea00 100644 --- a/src/common/relayd/relayd.c +++ b/src/common/relayd/relayd.c @@ -633,7 +633,7 @@ error: int relayd_end_data_pending(struct lttcomm_relayd_sock *rsock, uint64_t id, unsigned int *is_data_inflight) { - int ret; + int ret, recv_ret; struct lttcomm_relayd_end_data_pending msg; struct lttcomm_relayd_generic_reply reply; @@ -656,15 +656,15 @@ int relayd_end_data_pending(struct lttcomm_relayd_sock *rsock, uint64_t id, goto error; } - reply.ret_code = be32toh(reply.ret_code); - if (reply.ret_code < 0) { - ret = reply.ret_code; + recv_ret = be32toh(reply.ret_code); + if (recv_ret < 0) { + ret = recv_ret; goto error; } - *is_data_inflight = reply.ret_code; + *is_data_inflight = recv_ret; - DBG("Relayd end data pending is data inflight: %d", reply.ret_code); + DBG("Relayd end data pending is data inflight: %d", recv_ret); return 0; -- 2.34.1