agent: Fix coercion for pinentry_pid handling.

* agent/call-pinentry.c (start_pinentry): Don't use pid_t.

--

When pid_t is 64-bit integer and unsigned long is 32-bit,
it never matches, because left hand side does not fill
upper 32-bit.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-07-31 17:20:31 +09:00
parent 2a34a2afea
commit da3a4c54a8
1 changed files with 1 additions and 1 deletions

View File

@ -682,7 +682,7 @@ start_pinentry (ctrl_t ctrl)
log_info ("You may want to update to a newer pinentry\n");
rc = 0;
}
else if (!rc && (pid_t)pinentry_pid == (pid_t)(-1))
else if (!rc && pinentry_pid == (unsigned long)(-1L))
log_error ("pinentry did not return a PID\n");
else
{