Unverified Commit 3d36e44a by Stéphane Graber Committed by GitHub

Merge pull request #2313 from brauner/2018-05-11/compiler_fixes

confile: satisfy gcc-8
parents d9750081 d3bdf12c
......@@ -621,10 +621,14 @@ bool new_hwaddr(char *hwaddr)
int lxc_get_conf_str(char *retv, int inlen, const char *value)
{
size_t value_len;
if (!value)
return 0;
if (retv && inlen >= strlen(value) + 1)
strncpy(retv, value, strlen(value) + 1);
value_len = strlen(value);
if (retv && inlen >= value_len + 1)
memcpy(retv, value, value_len + 1);
return strlen(value);
}
......
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