freebsd-skq/lib/libcam
ngie 1d095aec58 Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf)
Part of my original reasoning as far as converting the snprintf
calls was to permit switching over from char[] to wchar_t[] in the
future, as well as futureproof in case cam_errbuf's size was ever
changed.

Unfortunately, my approach was bugged because it conflated the
number of items with the size of the buffer, instead of the number of
elements being a fixed size != 1 byte.

Use nitems(..) instead which counts the quantity of items of a specific
type, as opposed to an unqualified sizeof(..) (which assumes that the
number of characters is equal to the buffer size).

MFC after:	2 months
Noted by:	cem
Sponsored by:	Dell EMC Isilon
2017-03-29 08:38:31 +00:00
..
tests Start adding basic tests for cam(3) 2017-03-15 18:00:54 +00:00
cam_cdbparse.3 lib/libcam/cam_cdbparse.3: fix manpage warnings 2017-03-13 17:35:55 +00:00
cam.3 lib/libcam/cam.3: note that cam_freeccb(3) with ccb == NULL is a no-op 2017-03-13 02:12:33 +00:00
camlib.c Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf) 2017-03-29 08:38:31 +00:00
camlib.h Fix some localized style(9) issues and reword CAM_ERRBUF_SIZE description 2017-03-28 08:19:51 +00:00
Makefile Start adding basic tests for cam(3) 2017-03-15 18:00:54 +00:00
Makefile.depend META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
scsi_cmdparse.c Fix up r314189 2017-02-24 06:49:31 +00:00