diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-06-22 19:47:13 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-06-22 19:47:13 +0000 |
commit | 87c96548cc3064ea4354df0cdda9af0c5b7cf255 (patch) | |
tree | d713d96a87f892078fa0ff85c6f1acc5c788a0ab /sbin/dhclient | |
parent | f34d6eb01b0dd1c0a1c7cbb32562c61b7cd2078c (diff) |
Swap (opcount >= opleft || opcount == -1) to (opcount == -1 || opcount >= opleft) like
the rest of tree.
Spotted by deraadt@
Diffstat (limited to 'sbin/dhclient')
-rw-r--r-- | sbin/dhclient/options.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c index 833a0aebaad..b39aa872501 100644 --- a/sbin/dhclient/options.c +++ b/sbin/dhclient/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.118 2019/04/02 02:59:43 krw Exp $ */ +/* $OpenBSD: options.c,v 1.119 2019/06/22 19:47:12 krw Exp $ */ /* DHCP options parsing and reassembly. */ @@ -897,13 +897,13 @@ pretty_print_option(unsigned int code, struct option_data *option, log_procname, fmtbuf[j]); goto toobig; } - if (opcount >= opleft || opcount == -1) + if (opcount == -1 || opcount >= opleft) goto toobig; opleft -= opcount; op += opcount; if (j + 1 < numelem && comma != ':') { opcount = snprintf(op, opleft, " "); - if (opcount >= opleft || opcount == -1) + if (opcount == -1 || opcount >= opleft) goto toobig; opleft -= opcount; op += opcount; @@ -911,7 +911,7 @@ pretty_print_option(unsigned int code, struct option_data *option, } if (i + 1 < numhunk) { opcount = snprintf(op, opleft, "%c", comma); - if (opcount >= opleft || opcount == -1) + if (opcount == -1 || opcount >= opleft) goto toobig; opleft -= opcount; op += opcount; |