2
0
Эх сурвалжийг харах

uxc: add missing 'break' statement

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>
Daniel Golle 2 жил өмнө
parent
commit
59f7699202
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      uxc.c

+ 1 - 1
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]);