confile_utils: cleanup lxc_macvlan_mode_to_flag()

parent ba36abd0
......@@ -517,9 +517,7 @@ static struct lxc_macvlan_mode {
int lxc_macvlan_mode_to_flag(int *mode, const char *value)
{
size_t i;
for (i = 0; i < sizeof(macvlan_mode) / sizeof(macvlan_mode[0]); i++) {
for (size_t i = 0; i < sizeof(macvlan_mode) / sizeof(macvlan_mode[0]); i++) {
if (strcmp(macvlan_mode[i].name, value))
continue;
......@@ -527,7 +525,7 @@ int lxc_macvlan_mode_to_flag(int *mode, const char *value)
return 0;
}
return -1;
return ret_errno(EINVAL);
}
char *lxc_macvlan_flag_to_mode(int mode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment