From: Vincent Bernat Date: Sun, 31 Aug 2014 19:53:54 +0000 (+0200) Subject: lib: handle read failure in sync case X-Git-Tag: 0.7.11~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8568f6cd2277e570755c6efd5d8269fcccf5106f;p=thirdparty%2Flldpd.git lib: handle read failure in sync case This amends the previous commit with a more concise condition. --- diff --git a/src/lib/connection.c b/src/lib/connection.c index 8d34e961..5aa4c510 100644 --- a/src/lib/connection.c +++ b/src/lib/connection.c @@ -85,7 +85,7 @@ sync_recv(lldpctl_conn_t *lldpctl, } remain -= nb; offset += nb; - } while (remain > 0 && (nb > 0 || nb == -1)); + } while (remain > 0 && nb != 0); return offset; }