]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: use bitwise 'and' in kvm-ipc
authorSasha Levin <levinsasha928@gmail.com>
Wed, 9 May 2012 12:24:46 +0000 (14:24 +0200)
committerPekka Enberg <penberg@kernel.org>
Wed, 9 May 2012 12:26:36 +0000 (15:26 +0300)
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/kvm-ipc.c

index 257c806cf191841c252f7e2b9a04a1c8855c2e9b..70831b835976123b46a7f92764fafe19273fbfdb 100644 (file)
@@ -153,7 +153,7 @@ static void *kvm_ipc__thread(void *param)
                                        r = kvm_ipc__receive(client);
                                } while (r == 0);
 
-                       } else if (event.events && (EPOLLERR | EPOLLRDHUP | EPOLLHUP)) {
+                       } else if (event.events & (EPOLLERR | EPOLLRDHUP | EPOLLHUP)) {
                                kvm_ipc__close_conn(fd);
                        } else {
                                kvm_ipc__receive(fd);