Check the return value of sbuf_finish().

This commit is contained in:
Jaakko Heinonen 2012-08-23 16:25:36 +00:00
parent 3ff6b7162e
commit 5fcb06f86e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239612

View File

@ -4758,7 +4758,10 @@ smpreportgeneral(struct cam_device *device, int argc, char **argv,
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, int argc, char **argv,
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));