summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2019-07-22 15:59:49 +0000
committerkrw <krw@openbsd.org>2019-07-22 15:59:49 +0000
commitd53105e4c58e178299f98ac9bdeaec0b506d88a8 (patch)
tree7de5e8123be70b992628225ccf8cdfed1ce8cf32
parentimplement SO_DOMAIN and SO_PROTOCOL so that the domain and the protocol (diff)
downloadwireguard-openbsd-d53105e4c58e178299f98ac9bdeaec0b506d88a8.tar.xz
wireguard-openbsd-d53105e4c58e178299f98ac9bdeaec0b506d88a8.zip
Eliminate pointless "... else {}" branch to improve readability.
-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: