fio/server: fix confusing sk_out check
authorJens Axboe <axboe@kernel.dk>
Mon, 3 Jul 2023 15:16:45 +0000 (09:16 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Jul 2023 15:16:45 +0000 (09:16 -0600)
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 <axboe@kernel.dk>
server.c

index 5419059446b9762c15fd1ea69a7cfca056e231c5..bb423702a714224306445bbffeb12d174215c1fe 100644 (file)
--- 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();