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
858326e785
commit
654738b37a
@ -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…
x
Reference in New Issue
Block a user