Since strlcpy always null-terminates, and the buffer is zeroed before copy
anyway, there is no need to explicitly zero the end of the character
array, or to limit the bytes that strlcpy can write.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
return -1;
}
memset(solib, 0, sizeof(*solib));
return -1;
}
memset(solib, 0, sizeof(*solib));
- strlcpy(solib->name, path, PATH_MAX-1);
- solib->name[PATH_MAX-1] = 0;
+ strlcpy(solib->name, path, PATH_MAX);
TAILQ_INSERT_TAIL(&solib_list, solib, next);
return 0;
TAILQ_INSERT_TAIL(&solib_list, solib, next);
return 0;