From: florian Date: Mon, 3 Jun 2024 15:52:17 +0000 (+0000) Subject: knf; pointed out by deraadt X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=736e16a79db175d63d9ee50bc037de20ea9a0af8;p=openbsd knf; pointed out by deraadt --- diff --git a/sbin/dhcp6leased/dhcp6leased.c b/sbin/dhcp6leased/dhcp6leased.c index 8f6ac0b2664..f5cbacb23b5 100644 --- a/sbin/dhcp6leased/dhcp6leased.c +++ b/sbin/dhcp6leased/dhcp6leased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp6leased.c,v 1.7 2024/06/03 11:08:31 florian Exp $ */ +/* $OpenBSD: dhcp6leased.c,v 1.8 2024/06/03 15:52:17 florian Exp $ */ /* * Copyright (c) 2017, 2021, 2024 Florian Obser @@ -796,13 +796,13 @@ open_udpsock(uint32_t if_index) } } - if(sin6 == NULL) { + if (sin6 == NULL) { log_warnx("%s: missing link-local address on %s", __func__, if_name); goto out; } - if(rdomain == -1) { + if (rdomain == -1) { log_warnx("%s: cannot find rdomain for %s", __func__, if_name); goto out; @@ -946,7 +946,7 @@ get_uuid(void) { gen: uuid_create(&uuid, NULL); uuid_to_string(&uuid, &str, &status); - if(status != uuid_s_ok) + if (status != uuid_s_ok) fatalx("failed to generate uuid string representation"); len = snprintf(strbuf, sizeof(strbuf), "%s\n", str); @@ -983,7 +983,7 @@ get_uuid(void) { uuid_from_string(strbuf, &uuid, &status); - if(status != uuid_s_ok) { + if (status != uuid_s_ok) { log_warnx("failed to convert string to uuid: %s - %d", strbuf, status); goto gen; diff --git a/sbin/dhcp6leased/engine.c b/sbin/dhcp6leased/engine.c index 61e1ebd46ea..c55169714aa 100644 --- a/sbin/dhcp6leased/engine.c +++ b/sbin/dhcp6leased/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.5 2024/06/03 11:08:31 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.6 2024/06/03 15:52:17 florian Exp $ */ /* * Copyright (c) 2017, 2021, 2024 Florian Obser @@ -820,12 +820,12 @@ parse_dhcp(struct dhcp6leased_iface *iface, struct imsg_dhcp *dhcp) SIMPLEQ_FOREACH(ia_conf, &iface_conf->iface_ia_list, entry) { struct prefix *pd = &pds[ia_conf->id - 1]; - if(pd->prefix_len == 0) { + if (pd->prefix_len == 0) { log_warnx("%s: no IA for IAID %d found", __func__, ia_conf->id); goto out; } - if(pd->prefix_len > ia_conf->prefix_len) { + if (pd->prefix_len > ia_conf->prefix_len) { log_warnx("%s: prefix for IAID %d too small: %d > %d", __func__, ia_conf->id, pd->prefix_len, ia_conf->prefix_len);