Commit fc1f79f71ca79ba6be95af9b0c844902b09566a5
1 parent
00ea18d1
Use a more natural order
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7234 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
5 additions
and
5 deletions
hw/xen_console.c
... | ... | @@ -189,7 +189,7 @@ static int con_init(struct XenDevice *xendev) |
189 | 189 | free(dom); |
190 | 190 | |
191 | 191 | type = xenstore_read_str(con->console, "type"); |
192 | - if (!type || 0 != strcmp(type, "ioemu")) { | |
192 | + if (!type || strcmp(type, "ioemu" != 0)) { | |
193 | 193 | xen_be_printf(xendev, 1, "not for me (type=%s)\n", type); |
194 | 194 | return -1; |
195 | 195 | } | ... | ... |
hw/xen_disk.c
... | ... | @@ -179,7 +179,7 @@ static int ioreq_parse(struct ioreq *ioreq) |
179 | 179 | switch (ioreq->req.operation) { |
180 | 180 | case BLKIF_OP_READ: |
181 | 181 | ioreq->prot = PROT_WRITE; /* to memory */ |
182 | - if (BLKIF_OP_READ != ioreq->req.operation && blkdev->mode[0] != 'w') { | |
182 | + if (ioreq->req.operation != BLKIF_OP_READ && blkdev->mode[0] != 'w') { | |
183 | 183 | xen_be_printf(&blkdev->xendev, 0, "error: write req for ro device\n"); |
184 | 184 | goto err; |
185 | 185 | } |
... | ... | @@ -513,7 +513,7 @@ static void blk_handle_requests(struct XenBlkDev *blkdev) |
513 | 513 | |
514 | 514 | if (use_aio) |
515 | 515 | blk_send_response_all(blkdev); |
516 | - while ((rc != rp)) { | |
516 | + while (rc != rp) { | |
517 | 517 | /* pull request from ring */ |
518 | 518 | if (RING_REQUEST_CONS_OVERFLOW(&blkdev->rings.common, rc)) |
519 | 519 | break; | ... | ... |
hw/xen_domainbuild.c
... | ... | @@ -137,7 +137,7 @@ static void xen_domain_poll(void *opaque) |
137 | 137 | int rc; |
138 | 138 | |
139 | 139 | rc = xc_domain_getinfo(xen_xc, xen_domid, 1, &info); |
140 | - if ((1 != rc) || (info.domid != xen_domid)) { | |
140 | + if ((rc != 1) || (info.domid != xen_domid)) { | |
141 | 141 | qemu_log("xen: domain %d is gone\n", xen_domid); |
142 | 142 | goto quit; |
143 | 143 | } |
... | ... | @@ -186,7 +186,7 @@ static void xen_domain_watcher(void) |
186 | 186 | rc = read(fd[0], &byte, 1); |
187 | 187 | switch (rc) { |
188 | 188 | case -1: |
189 | - if (EINTR == errno) | |
189 | + if (errno == EINTR) | |
190 | 190 | continue; |
191 | 191 | qemu_log("%s: Huh? read error: %s\n", __FUNCTION__, strerror(errno)); |
192 | 192 | qemu_running = 0; | ... | ... |