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:
Pedro F. Giffuni 2016-04-03 16:38:15 +00:00
parent 21ff1f7469
commit f18b18fe5f

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