vhost: remove unneeded variable assignment
authorEmmanuel Roullit <emmanuel.roullit@gmail.com>
Tue, 24 Jan 2017 20:31:29 +0000 (21:31 +0100)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Mon, 30 Jan 2017 12:47:20 +0000 (13:47 +0100)
Found with clang static analysis:
lib/librte_vhost/vhost_user.c:996:3: warning:
Value stored to 'ret' is never read
        ret = vhost_user_get_vring_base(dev, &msg.payload.state);
        ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/vhost_user.c

index ab7f3fc..cb2156a 100644 (file)
@@ -996,7 +996,7 @@ vhost_user_msg_handler(int vid, int fd)
                break;
 
        case VHOST_USER_GET_VRING_BASE:
-               ret = vhost_user_get_vring_base(dev, &msg.payload.state);
+               vhost_user_get_vring_base(dev, &msg.payload.state);
                msg.size = sizeof(msg.payload.state);
                send_vhost_message(fd, &msg);
                break;