Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Oct 2012 10:44:51 +0000 (UTC)
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r241223 - stable/9/sbin/camcontrol
Message-ID:  <201210051044.q95AipCg052278@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210051044.q95AipCg052278>