From 2e8fc46fb39f94651d93ac1bba343e4d34987018 Mon Sep 17 00:00:00 2001 From: dtucker Date: Fri, 31 Mar 2023 04:45:08 +0000 Subject: [PATCH] Explictly ignore return codes where we don't check them. From Dmitry Belyavskiy via github PR#238, ok djm@ --- usr.bin/ssh/scp.c | 6 +++--- usr.bin/ssh/sftp.c | 4 ++-- usr.bin/ssh/ssh-agent.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index ea3deedc98e..9b8995b40c9 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.254 2023/03/27 03:25:08 djm Exp $ */ +/* $OpenBSD: scp.c,v 1.255 2023/03/31 04:45:08 dtucker Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -166,11 +166,11 @@ killchild(int signo) { if (do_cmd_pid > 1) { kill(do_cmd_pid, signo ? signo : SIGTERM); - waitpid(do_cmd_pid, NULL, 0); + (void)waitpid(do_cmd_pid, NULL, 0); } if (do_cmd_pid2 > 1) { kill(do_cmd_pid2, signo ? signo : SIGTERM); - waitpid(do_cmd_pid2, NULL, 0); + (void)waitpid(do_cmd_pid2, NULL, 0); } if (signo) diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index fb4a50bba44..1d17616d548 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.231 2023/03/29 00:59:08 dtucker Exp $ */ +/* $OpenBSD: sftp.c,v 1.232 2023/03/31 04:45:08 dtucker Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -204,7 +204,7 @@ killchild(int signo) pid = sshpid; if (pid > 1) { kill(pid, SIGTERM); - waitpid(pid, NULL, 0); + (void)waitpid(pid, NULL, 0); } _exit(1); diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c index 9627e0c74a1..72e9da86582 100644 --- a/usr.bin/ssh/ssh-agent.c +++ b/usr.bin/ssh/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.297 2023/03/09 21:06:24 jcs Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.298 2023/03/31 04:45:08 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -2005,8 +2005,8 @@ main(int ac, char **av) sanitise_stdfd(); /* drop */ - setegid(getgid()); - setgid(getgid()); + (void)setegid(getgid()); + (void)setgid(getgid()); if (getrlimit(RLIMIT_NOFILE, &rlim) == -1) fatal("%s: getrlimit: %s", __progname, strerror(errno)); -- 2.20.1