svn commit: r241223 - stable/9/sbin/camcontrol

Jaakko Heinonen jh at FreeBSD.org
Fri Oct 5 10:44:51 UTC 2012


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));
 


More information about the svn-src-stable-9 mailing list