]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix va_list handling
authorngie <ngie@FreeBSD.org>
Thu, 28 Apr 2016 18:41:55 +0000 (18:41 +0000)
committerngie <ngie@FreeBSD.org>
Thu, 28 Apr 2016 18:41:55 +0000 (18:41 +0000)
commit8ce3c21c211a0bffd6ec5e2b282ba4dae407fd04
treeae1730daec3c7dd50f64076b466d1c72d522db74
parent9021956875a5f4d38ec269b39633331e091e01ee
Fix va_list handling

- Add missing va_end's after corresponding va_start's to cleanup state
- Eliminate questionable bzero'ing of va_list passed in to
  do_buff_decode(..) and do_encode(..) from buff_{de,en}code_visit(..)
  and csio_{de,en}code_visit(..). Make va_list a pointer instead and
  pass NULL into the underlying functions to handler this in a portable
  way.
- Do some minor style(9) clean up in affected functions.

Differential Revision: https://reviews.freebsd.org/D6072
MFC after: 3 days
Reported by: cppcheck, Coverity
CID: 1018500-1018503
Reviewed by: cem
Sponsored by: EMC / Isilon Storage Division
lib/libcam/scsi_cmdparse.c