From 8037423f08649a7c3378dadf95327d6553105264 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 25 Feb 2013 14:02:42 +0100 Subject: [PATCH] debug: only do getpid() if we have to Signed-off-by: Jens Axboe --- debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debug.c b/debug.c index 5e980633..ecee8e35 100644 --- a/debug.c +++ b/debug.c @@ -11,9 +11,8 @@ void __dprint(int type, const char *str, ...) assert(type < FD_DEBUG_MAX); - pid = getpid(); if (fio_debug_jobp && *fio_debug_jobp != -1U - && pid != *fio_debug_jobp) + && (pid = getpid() != *fio_debug_jobp)) return; log_local("%-8s ", debug_levels[type].name); -- 2.25.1