diff options
author | Alan Somers <asomers@FreeBSD.org> | 2017-05-10 16:06:22 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2017-05-10 16:06:22 +0000 |
commit | 0ce59aa848470e6e5060b9c2b47fce7888546547 (patch) | |
tree | 75391bc6df63fc64fc02835c83fbeaecc5cbc657 /usr.bin/mkuzip | |
parent | daccabe958923500d73bfa6d9d732ca9728b4276 (diff) | |
download | src-test-0ce59aa848470e6e5060b9c2b47fce7888546547.tar.gz src-test-0ce59aa848470e6e5060b9c2b47fce7888546547.zip |
Don't depend on assert(3) getting evaluated
Reported by: imp
MFC after: 3 weeks
X-MFC-With: 318141, 318143
Sponsored by: Spectra Logic Corp
Notes
Notes:
svn path=/head/; revision=318144
Diffstat (limited to 'usr.bin/mkuzip')
-rw-r--r-- | usr.bin/mkuzip/mkuzip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mkuzip/mkuzip.c b/usr.bin/mkuzip/mkuzip.c index e046c735a0364..1a78ae2c9563f 100644 --- a/usr.bin/mkuzip/mkuzip.c +++ b/usr.bin/mkuzip/mkuzip.c @@ -108,7 +108,7 @@ int main(int argc, char **argv) struct mkuz_conveyor *cvp; void *c_ctx; struct mkuz_blk_info *chit; - size_t ncpusz, ncpu; + size_t ncpusz, ncpu, magiclen; double st, et; st = getdtime(); @@ -192,8 +192,8 @@ int main(int argc, char **argv) /* Not reached */ } - assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) - < sizeof(hdr.magic)); + magiclen = strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)); + assert(magiclen < sizeof(hdr.magic)); if (cfs.en_dedup != 0) { hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; |