]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix va_list handling
authorEnji Cooper <ngie@FreeBSD.org>
Thu, 28 Apr 2016 18:41:55 +0000 (18:41 +0000)
committerEnji Cooper <ngie@FreeBSD.org>
Thu, 28 Apr 2016 18:41:55 +0000 (18:41 +0000)
commit2357dac4307983329362bb3f257a430984a163c3
treeae1730daec3c7dd50f64076b466d1c72d522db74
parent9aa021d4164a183c84181ea126b4d5d02e31e857
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