]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
ptcomm: Fix get_backend_pid regression.
authorRadosław Korzeniewski <radoslaw@korzeniewski.net>
Mon, 7 Dec 2020 15:11:09 +0000 (16:11 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:59 +0000 (09:02 +0100)
bacula/src/plugins/fd/pluginlib/ptcomm.h

index b9197d60b8e4bc134b9697483d11a4d9e6ddf0ae..b0620c06524b02e47bb1b89e9cc762a533e911ca 100644 (file)
@@ -185,7 +185,7 @@ public:
     *
     * @return int backend PID - when backend available; -1 - when backend is unavailable
     */
-   int get_backend_pid() { return (bpipe != NULL) * bpipe->worker_pid - (bpipe == NULL); }
+   int get_backend_pid() { return (bpipe != NULL) ? bpipe->worker_pid : -1; }
 
    /**
     * @brief Sets a BPIPE object for our main communication channel.