diff options
author | 2019-06-22 19:47:12 +0000 | |
---|---|---|
committer | 2019-06-22 19:47:12 +0000 | |
commit | a15aed73e84a48b581cfa07cbd04ecf3b7c74581 (patch) | |
tree | 6738d5c995c1f4a7f985e5a8535b560513c9a395 | |
parent | Add more option tests to ca in appstest.sh (diff) | |
download | wireguard-openbsd-a15aed73e84a48b581cfa07cbd04ecf3b7c74581.tar.xz wireguard-openbsd-a15aed73e84a48b581cfa07cbd04ecf3b7c74581.zip |
Swap (opcount >= opleft || opcount == -1) to (opcount == -1 || opcount >= opleft) like
the rest of tree.
Spotted by deraadt@
-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; |