camdd: initialize devs earlier
GCC9 points out that devs may be used initialized after the bailout label; in-fact, if num_io_opts != 2 then it is. Move the initialization up a little bit. Reviewed by: ken MFC after: 3 days
This commit is contained in:
parent
68cd0e8de1
commit
4547d684a7
@ -3226,14 +3226,14 @@ camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, uint64_t max_io,
|
||||
int error = 0;
|
||||
int i;
|
||||
|
||||
bzero(devs, sizeof(devs));
|
||||
|
||||
if (num_io_opts != 2) {
|
||||
warnx("Must have one input and one output path");
|
||||
error = 1;
|
||||
goto bailout;
|
||||
}
|
||||
|
||||
bzero(devs, sizeof(devs));
|
||||
|
||||
for (i = 0; i < num_io_opts; i++) {
|
||||
switch (io_opts[i].dev_type) {
|
||||
case CAMDD_DEV_PASS: {
|
||||
|
Loading…
Reference in New Issue
Block a user