summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2019-07-22 15:59:50 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2019-07-22 15:59:50 +0000
commitaa96e948e9d23ed4d6b600cae1adcb8ea50b639a (patch)
tree58b4e55a069450c6918b42ea83a140194b7126b2 /sbin/dhclient
parent0a84f9a3f1b777e95403fce739bfdd622ca5bce9 (diff)
Eliminate pointless "... else {}" branch to improve readability.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/clparse.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index 86576b70da7..da0c3484538 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clparse.c,v 1.190 2019/07/21 15:47:02 krw Exp $ */
+/* $OpenBSD: clparse.c,v 1.191 2019/07/22 15:59:49 krw Exp $ */
/* Parser for dhclient config and lease files. */
@@ -863,14 +863,13 @@ parse_option(FILE *cfile, int *code, struct option_data *options)
} else if (parse_hex_octets(cfile, &len, &dp)
== 0) {
return 0;
- } else {
- val = rfc1035_as_string(dp, len);
- free(dp);
- dp = strdup(val);
- if (dp == NULL)
- fatal("RFC1035 hex octets");
- len = strlen(dp) + 1;
}
+ val = rfc1035_as_string(dp, len);
+ free(dp);
+ dp = strdup(val);
+ if (dp == NULL)
+ fatal("RFC1035 hex octets");
+ len = strlen(dp) + 1;
freedp = 1;
break;
default: