confile_utils: cleanup network_ifname()

parent ccdd7c31
...@@ -683,12 +683,11 @@ int network_ifname(char *valuep, const char *value, size_t size) ...@@ -683,12 +683,11 @@ int network_ifname(char *valuep, const char *value, size_t size)
size_t retlen; size_t retlen;
if (!valuep || !value) if (!valuep || !value)
return -1; return ret_errno(EINVAL);
retlen = strlcpy(valuep, value, size); retlen = strlcpy(valuep, value, size);
if (retlen >= size) if (retlen >= size)
ERROR("Network device name \"%s\" is too long (>= %zu)", value, ERROR("Network device name \"%s\" is too long (>= %zu)", value, size);
size);
return 0; return 0;
} }
......
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