chdone(): Prevent returning uninitialized scalar value.

If there is an error different from ERESTART, there is some
chance that we may end up accessing an uninitialized value. This
doesn't seem likely/possible but initialize announce_buf[0],
just in case.

CID:	1006486
This commit is contained in:
pfg 2016-04-03 16:38:15 +00:00
parent 858326e785
commit 654738b37a

View File

@ -651,6 +651,7 @@ chdone(struct cam_periph *periph, union ccb *done_ccb)
} else {
int error;
announce_buf[0] = '\0';
error = cherror(done_ccb, CAM_RETRY_SELTO,
SF_RETRY_UA | SF_NO_PRINT);
/*