Skip to content

Commit

Permalink
Merge branch 'fix-coverity-scan-defect' of https://github.com/parkvib…
Browse files Browse the repository at this point in the history
…es/fio

* 'fix-coverity-scan-defect' of https://github.com/parkvibes/fio:
  iolog: fix Error handling issues (NEGATIVE_RETURNS)
  iolog: fix Null pointer dereferences (FORWARD_NULL)
  • Loading branch information
vincentkfu committed May 31, 2024
2 parents d5fbe84 + 4150d2e commit 93dc854
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iolog.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int ipo_special(struct thread_data *td, struct io_piece *ipo)
int dp_init_ret = dp_init(td);

if (dp_init_ret != 0) {
td_verror(td, dp_init_ret, "dp_init");
td_verror(td, abs(dp_init_ret), "dp_init");
return -1;
}
}
Expand Down Expand Up @@ -236,15 +236,15 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u)
io_u->buflen, io_u->file->file_name);
if (ipo->delay)
iolog_delay(td, ipo->delay);

if (td->o.dp_type != FIO_DP_NONE)
dp_fill_dspec_data(td, io_u);
} else {
elapsed = mtime_since_genesis();
if (ipo->delay > elapsed)
usec_sleep(td, (ipo->delay - elapsed) * 1000);
}

if (td->o.dp_type != FIO_DP_NONE)
dp_fill_dspec_data(td, io_u);

free(ipo);

if (io_u->ddir != DDIR_WAIT)
Expand Down

0 comments on commit 93dc854

Please sign in to comment.