lxc_user_nic: cleanup get_alloted()

parent 4c7de7c5
...@@ -318,10 +318,10 @@ static int get_alloted(char *me, char *intype, char *link, ...@@ -318,10 +318,10 @@ static int get_alloted(char *me, char *intype, char *link,
if (ret != 4) if (ret != 4)
continue; continue;
if (strlen(name) == 0) if (is_empty_string(name))
continue; continue;
if (strcmp(name, me)) { if (!strequal(name, me)) {
if (name[0] != '@') if (name[0] != '@')
continue; continue;
...@@ -329,17 +329,17 @@ static int get_alloted(char *me, char *intype, char *link, ...@@ -329,17 +329,17 @@ static int get_alloted(char *me, char *intype, char *link,
continue; continue;
} }
if (strcmp(type, intype)) if (!strequal(type, intype))
continue; continue;
if (strcmp(link, br)) if (!strequal(link, br))
continue; continue;
/* Found the user or group with the appropriate settings, /*
* therefore finish the search. What to do if there are more * Found the user or group with the appropriate settings,
* than one applicable lines? not specified in the docs. Since * therefore finish the search. What to do if there are is more
* getline is implemented with realloc, we don't need to free * than one applicable line? Currently this is not specified in
* line until exiting func. * the docs.
* *
* If append_alloted returns NULL, e.g. due to a malloc error, * If append_alloted returns NULL, e.g. due to a malloc error,
* we set count to 0 and break the loop, allowing cleanup and * we set count to 0 and break the loop, allowing cleanup and
......
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