vhost_set_vring(): turn pollstart/pollstop into bool
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 27 Aug 2012 18:21:39 +0000 (14:21 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 27 Sep 2012 01:10:12 +0000 (21:10 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/vhost/vhost.c

index ef82a0d..99ac2cb 100644 (file)
@@ -636,8 +636,8 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m)
 
 static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp)
 {
-       struct file *eventfp, *filep = NULL,
-                   *pollstart = NULL, *pollstop = NULL;
+       struct file *eventfp, *filep = NULL;
+       bool pollstart = false, pollstop = false;
        struct eventfd_ctx *ctx = NULL;
        u32 __user *idxp = argp;
        struct vhost_virtqueue *vq;
@@ -763,8 +763,8 @@ static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp)
                        break;
                }
                if (eventfp != vq->kick) {
-                       pollstop = filep = vq->kick;
-                       pollstart = vq->kick = eventfp;
+                       pollstop = (filep = vq->kick) != NULL;
+                       pollstart = (vq->kick = eventfp) != NULL;
                } else
                        filep = eventfp;
                break;