Fix: comparison of unsigned value agains < 0
authorDavid Goulet <dgoulet@efficios.com>
Mon, 25 Nov 2013 19:15:17 +0000 (14:15 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 25 Nov 2013 19:59:32 +0000 (14:59 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/relayd/relayd.c

index 7c90b4d1a05a4e6fdc0d041288cd7fe21784b2d7..ce46c9c54504645b9ff74827eea4151b41405fda 100644 (file)
@@ -691,7 +691,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;
 
@@ -714,15 +714,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;
 
This page took 0.026491 seconds and 4 git commands to generate.