From: Marek Vasut Date: Sun, 20 Apr 2014 17:29:52 +0000 (+0200) Subject: asix-sigma: Squash yoda-condition in upload_firmware() X-Git-Tag: libsigrok-0.3.0~47 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=29b66a2eb0ffac181c2d7b0c0d7868e5344fc272;p=libsigrok.git asix-sigma: Squash yoda-condition in upload_firmware() Signed-off-by: Marek Vasut --- diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 2cd9b9e8..8e794039 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -589,7 +589,7 @@ static int upload_firmware(int firmware_idx, struct dev_context *devc) ftdi_usb_purge_buffers(ftdic); /* Discard garbage. */ - while (1 == sigma_read(&pins, 1, devc)) + while (sigma_read(&pins, 1, devc) == 1) ; /* Initialize the logic analyzer mode. */