svn commit: r239612 - head/sbin/camcontrol
Jaakko Heinonen
jh at FreeBSD.org
Thu Aug 23 16:25:37 UTC 2012
Author: jh
Date: Thu Aug 23 16:25:36 2012
New Revision: 239612
URL: http://svn.freebsd.org/changeset/base/239612
Log:
Check the return value of sbuf_finish().
Modified:
head/sbin/camcontrol/camcontrol.c
Modified: head/sbin/camcontrol/camcontrol.c
==============================================================================
--- head/sbin/camcontrol/camcontrol.c Thu Aug 23 12:20:29 2012 (r239611)
+++ head/sbin/camcontrol/camcontrol.c Thu Aug 23 16:25:36 2012 (r239612)
@@ -4758,7 +4758,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));
@@ -5129,7 +5132,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));
More information about the svn-src-all
mailing list