[Drbd-dev] Avoid compiler warning about non-bool in logical expression
David Butterfield
dab21774 at gmail.com
Wed Jun 5 18:07:51 CEST 2019
Avoid a compiler warning:
drbd_receiver.c:1693:12: warning: logical ‘and’ applied to non-boolean constant [-Wlogical-op]
diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
@@ -1690,7 +1690,7 @@ next_bio:
bio->bi_next = NULL;
/* strip off REQ_UNPLUG unless it is the last bio */
- if (bios && DRBD_REQ_UNPLUG)
+ if (bios && (DRBD_REQ_UNPLUG != 0))
bio->bi_opf &= ~DRBD_REQ_UNPLUG;
drbd_generic_make_request(device, fault_type, bio);
More information about the drbd-dev
mailing list