Skip to content

Commit

Permalink
confile_utils: cleanup network_ifname()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Dec 10, 2020
1 parent 4f3de2a commit ffb7e0f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lxc/confile_utils.c
Expand Up @@ -698,12 +698,11 @@ int network_ifname(char *valuep, const char *value, size_t size)
size_t retlen;

if (!valuep || !value)
return -1;
return ret_errno(EINVAL);

retlen = strlcpy(valuep, value, size);
if (retlen >= size)
ERROR("Network device name \"%s\" is too long (>= %zu)", value,
size);
ERROR("Network device name \"%s\" is too long (>= %zu)", value, size);

return 0;
}
Expand Down

0 comments on commit ffb7e0f

Please sign in to comment.