knf; pointed out by deraadt
authorflorian <florian@openbsd.org>
Mon, 3 Jun 2024 15:52:17 +0000 (15:52 +0000)
committerflorian <florian@openbsd.org>
Mon, 3 Jun 2024 15:52:17 +0000 (15:52 +0000)
sbin/dhcp6leased/dhcp6leased.c
sbin/dhcp6leased/engine.c

index 8f6ac0b..f5cbacb 100644 (file)
@@ -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 <florian@openbsd.org>
@@ -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;
index 61e1ebd..c551697 100644 (file)
@@ -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 <florian@openbsd.org>
@@ -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);