Check the return value of sbuf_finish().
This commit is contained in:
parent
3ff6b7162e
commit
5fcb06f86e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239612
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user