diff options
author | 2019-07-22 15:59:49 +0000 | |
---|---|---|
committer | 2019-07-22 15:59:49 +0000 | |
commit | d53105e4c58e178299f98ac9bdeaec0b506d88a8 (patch) | |
tree | 7de5e8123be70b992628225ccf8cdfed1ce8cf32 | |
parent | implement SO_DOMAIN and SO_PROTOCOL so that the domain and the protocol (diff) | |
download | wireguard-openbsd-d53105e4c58e178299f98ac9bdeaec0b506d88a8.tar.xz wireguard-openbsd-d53105e4c58e178299f98ac9bdeaec0b506d88a8.zip |
Eliminate pointless "... else {}" branch to improve readability.
-rw-r--r-- | sbin/dhclient/clparse.c | 15 |
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: |