From: Jens Axboe Date: Mon, 3 Jul 2023 15:16:45 +0000 (-0600) Subject: fio/server: fix confusing sk_out check X-Git-Tag: fio-3.36~74 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=41508de67c06661ff1d473d108a8a01912ade114;p=fio.git fio/server: fix confusing sk_out check The previous assert check we had here just checked for sk_out->sk being -1, but if sk_out itself was set. Fixes: 83276370ce4d ("fixed compiler warnings if NDEBUG enabled in core code") Signed-off-by: Jens Axboe --- diff --git a/server.c b/server.c index 54190594..bb423702 100644 --- a/server.c +++ b/server.c @@ -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();