From: Christian Brauner Date: Wed, 9 Dec 2020 08:59:56 +0000 (+0100) Subject: confile_utils: cleanup network_ifname() X-Git-Tag: lxc-5.0.0~330^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffb7e0f6c31f03b645076772788fdc8ffa6abba2;p=thirdparty%2Flxc.git confile_utils: cleanup network_ifname() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/confile_utils.c b/src/lxc/confile_utils.c index 42d274c35..34ea92345 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; }