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:
parent
21ff1f7469
commit
f18b18fe5f
@ -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);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user