diff options
author | vangyzen <vangyzen@FreeBSD.org> | 2016-05-14 00:35:35 +0000 |
---|---|---|
committer | vangyzen <vangyzen@FreeBSD.org> | 2016-05-14 00:35:35 +0000 |
commit | 2773c653430e3fac6d3b245160efbd33879bc690 (patch) | |
tree | 8da7769cb4aa77d1f5f61bc6f72d54df2b731aad /etc/mtree | |
parent | 55d8594415c3da6fd8a2c740b4a551edf93f8090 (diff) | |
download | FreeBSD-src-2773c653430e3fac6d3b245160efbd33879bc690.zip FreeBSD-src-2773c653430e3fac6d3b245160efbd33879bc690.tar.gz |
iconvctl(3): remove superfluous NULL pointer tests
convname and dst are guaranteed to be non-NULL by iconv_open(3).
src is an array. Remove these tests for NULL pointers.
While I'm here, eliminate a strlcpy with a correct but suspicious-looking
calculation for the third parameter (i.e. not a simple sizeof).
Compare the strings in-place instead of copying.
Found by: bdrewery
Found by: Coverity
CID: 1130050, 1130056
MFC after: 3 days
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D6338
Diffstat (limited to 'etc/mtree')
-rw-r--r-- | etc/mtree/BSD.tests.dist | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index b887c0a..f18091d 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -261,6 +261,8 @@ data .. .. + iconv + .. inet .. locale |