From ffb7e0f6c31f03b645076772788fdc8ffa6abba2 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 9 Dec 2020 09:59:56 +0100 Subject: [PATCH] confile_utils: cleanup network_ifname() Signed-off-by: Christian Brauner --- src/lxc/confile_utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lxc/confile_utils.c b/src/lxc/confile_utils.c index 42d274c353..34ea92345f 100644 --- a/src/lxc/confile_utils.c +++ b/src/lxc/confile_utils.c @@ -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; }