diff options
Diffstat (limited to 'src/assuan-connect.c')
-rw-r--r-- | src/assuan-connect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/assuan-connect.c b/src/assuan-connect.c index 009aaab..cedaa66 100644 --- a/src/assuan-connect.c +++ b/src/assuan-connect.c @@ -47,8 +47,9 @@ assuan_disconnect (ASSUAN_CONTEXT ctx) } } +/* Return the PID of the perr or -1 if not known. */ pid_t assuan_get_pid (ASSUAN_CONTEXT ctx) { - return ctx ? ctx->pid : -1; + return (ctx && ctx->pid)? ctx->pid : -1; } |