mirror of
git://git.gnupg.org/gnupg.git
synced 2025-06-18 20:37:01 +02:00
agent: Minor fix for get_client_pid.
* agent/command-ssh.c (get_client_pid): Use 0 to initialize. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
943176c732
commit
5744d2038b
@ -3567,7 +3567,7 @@ ssh_request_process (ctrl_t ctrl, estream_t stream_sock)
|
||||
static unsigned long
|
||||
get_client_pid (int fd)
|
||||
{
|
||||
pid_t client_pid = (pid_t)(-1);
|
||||
pid_t client_pid = (pid_t)0;
|
||||
|
||||
#ifdef SO_PEERCRED
|
||||
{
|
||||
@ -3613,9 +3613,11 @@ get_client_pid (int fd)
|
||||
ucred_free (ucred);
|
||||
}
|
||||
}
|
||||
#else
|
||||
(void)fd;
|
||||
#endif
|
||||
|
||||
return client_pid == (pid_t)(-1)? 0 : (unsigned long)client_pid;
|
||||
return (unsigned long)client_pid;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user