Skip to content

Commit

Permalink
fio/server: fix confusing sk_out check
Browse files Browse the repository at this point in the history
The previous assert check we had here just checked for sk_out->sk being
-1, but if sk_out itself was set.

Fixes: 8327637 ("fixed compiler warnings if NDEBUG enabled in core code")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
axboe committed Jul 3, 2023
1 parent 2091760 commit 41508de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2343,7 +2343,8 @@ void fio_server_send_add_job(struct thread_data *td)
void fio_server_send_start(struct thread_data *td)
{
struct sk_out *sk_out = pthread_getspecific(sk_out_key);
if (!sk_out || sk_out->sk == -1) {

if (sk_out->sk == -1) {
log_err("pthread getting specific for key failed, sk_out %p, sk %i, err: %i:%s",
sk_out, sk_out->sk, errno, strerror(errno));
abort();
Expand Down

0 comments on commit 41508de

Please sign in to comment.