Author: jh
Date: Fri Oct 5 10:44:50 2012
New Revision: 241223
URL: http://svn.freebsd.org/changeset/base/241223
Log:
MFC r239612: Check the return value of sbuf_finish().
Modified:
stable/9/sbin/camcontrol/camcontrol.c
Directory Properties:
stable/9/sbin/camcontrol/ (props changed)
Modified: stable/9/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/9/sbin/camcontrol/camcontrol.c Fri Oct 5 09:47:54 2012
(r241222)
+++ stable/9/sbin/camcontrol/camcontrol.c Fri Oct 5 10:44:50 2012
(r241223)
@@ -4757,7 +4757,10 @@ try_long:
smp_report_general_sbuf(response, sizeof(*response), sb);
- sbuf_finish(sb);
+ if (sbuf_finish(sb) != 0) {
+ warnx("%s: sbuf_finish", __func__);
+ goto bailout;
+ }
printf("%s", sbuf_data(sb));
@@ -5128,7 +5131,10 @@ smpmaninfo(struct cam_device *device, in
smp_report_manuf_info_sbuf(&response, sizeof(response), sb);
- sbuf_finish(sb);
+ if (sbuf_finish(sb) != 0) {
+ warnx("%s: sbuf_finish", __func__);
+ goto bailout;
+ }
printf("%s", sbuf_data(sb));
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"