diff options
author | Richard Yao <[email protected]> | 2013-07-02 00:07:15 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-07-02 10:39:24 -0700 |
commit | 3db3ff4a787acf068b122562fb5be5aecec2611f (patch) | |
tree | edf41a3f51770a5aeb82fdd1d4c300efd53c0267 /module/zcommon/zfs_prop.c | |
parent | 29dee3ee9ac68d8a75c0d518b1342f447cd2ddc0 (diff) |
Use MAXPATHLEN instead of sizeof in snprintf
This silences a GCC 4.8.0 warning by fixing a programming error
caught by static analysis:
../../cmd/ztest/ztest.c: In function ‘ztest_vdev_aux_add_remove’:
../../cmd/ztest/ztest.c:2584:33: error: argument to ‘sizeof’
in ‘snprintf’ call is the same expression as the destination;
did you mean to provide an explicit length?
[-Werror=sizeof-pointer-memaccess]
(void) snprintf(path, sizeof (path), ztest_aux_template,
^
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1480
Diffstat (limited to 'module/zcommon/zfs_prop.c')
0 files changed, 0 insertions, 0 deletions