X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fgwinstek-gpd%2Fprotocol.c;h=6038c637ee9e751df3888723ae82d41111384478;hb=3e33089b725f7fdaf1bf7dad0103825b316c1541;hp=a054e91be962223a6ef58cde0c88eeeacdb300f7;hpb=49052159091a6914f8611ca53d56ec4a83b41d51;p=libsigrok.git diff --git a/src/hardware/gwinstek-gpd/protocol.c b/src/hardware/gwinstek-gpd/protocol.c index a054e91b..6038c637 100644 --- a/src/hardware/gwinstek-gpd/protocol.c +++ b/src/hardware/gwinstek-gpd/protocol.c @@ -53,7 +53,7 @@ SR_PRIV int gpd_receive_reply(struct sr_serial_dev_inst *serial, char *buf, gint64 start, remaining; const int timeout_ms = 100; - if (!serial || (lines <= 0) || !buf || (buflen <= 0)) + if (!serial || !buf || (buflen <= 0)) return SR_ERR_ARG; start = g_get_monotonic_time();