Properly NULL terminate string in zfs_strcmp_pathname

The utility cppcheck caught this.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2330
This commit is contained in:
Richard Yao 2014-04-22 20:25:39 -04:00 committed by Brian Behlendorf
parent a05dfd0028
commit 928ee9fe18
1 changed files with 1 additions and 1 deletions

View File

@ -962,7 +962,7 @@ zfs_strcmp_pathname(char *name, char *cmp, int wholedisk)
if (name[0] != '/')
return (zfs_strcmp_shortname(name, cmp_name, wholedisk));
strncpy(path_name, name, MAXPATHLEN);
(void) strlcpy(path_name, name, MAXPATHLEN);
path_len = strlen(path_name);
cmp_len = strlen(cmp_name);