uxc: add missing 'break' statement
authorDaniel Golle <daniel@makrotopia.org>
Sun, 17 Oct 2021 16:22:56 +0000 (17:22 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 17 Oct 2021 18:34:02 +0000 (19:34 +0100)
Without the break statement the next element in the iteration will
overwrite the found attributes.
Stop iterating once entry has been found, so matching attributes will
be used.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
uxc.c

diff --git a/uxc.c b/uxc.c
index b33513f5c33d2fc51855b86eb8b1bbab8ecc4a28..d8db49d104a4be2c7ee804711c7e99bbaffdf6ea 100644 (file)
--- a/uxc.c
+++ b/uxc.c
@@ -530,6 +530,7 @@ static int uxc_create(char *name, bool immediately)
                        continue;
 
                found = true;
+               break;
        }
 
        if (!found)
@@ -546,7 +547,6 @@ static int uxc_create(char *name, bool immediately)
        if (tb[CONF_WRITE_OVERLAY_PATH])
                writepath = blobmsg_get_string(tb[CONF_WRITE_OVERLAY_PATH]);
 
-
        if (tb[CONF_JAIL])
                jailname = blobmsg_get_string(tb[CONF_JAIL]);