From: tobhe Date: Wed, 15 Feb 2023 20:44:01 +0000 (+0000) Subject: proc_ispeer() is not used anywhere anymore so remove it everywhere. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c1868907b7edd3e71050ef4a1b5d128fa0d22f81;p=openbsd proc_ispeer() is not used anywhere anymore so remove it everywhere. ok florian@ bluhm@ ok for vmd mlarkin@ --- diff --git a/sbin/iked/proc.c b/sbin/iked/proc.c index 076fec43ade..6588f647bbd 100644 --- a/sbin/iked/proc.c +++ b/sbin/iked/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.35 2021/04/20 21:11:56 dv Exp $ */ +/* $OpenBSD: proc.c,v 1.36 2023/02/15 20:44:01 tobhe Exp $ */ /* * Copyright (c) 2010 - 2014 Reyk Floeter @@ -39,24 +39,11 @@ enum privsep_procid privsep_process; void proc_open(struct privsep *, struct privsep_proc *, struct privsep_proc *, size_t); void proc_close(struct privsep *); -int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid); void proc_shutdown(struct privsep_proc *); void proc_sig_handler(int, short, void *); void proc_range(struct privsep *, enum privsep_procid, int *, int *); int proc_dispatch_null(int, struct privsep_proc *, struct imsg *); -int -proc_ispeer(struct privsep_proc *procs, unsigned int nproc, - enum privsep_procid type) -{ - unsigned int i; - - for (i = 0; i < nproc; i++) - if (procs[i].p_id == type) - return (1); - return (0); -} - void proc_init(struct privsep *ps, struct privsep_proc *procs, unsigned int nproc) { diff --git a/usr.sbin/httpd/proc.c b/usr.sbin/httpd/proc.c index 3d701814496..71bb3c287db 100644 --- a/usr.sbin/httpd/proc.c +++ b/usr.sbin/httpd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.41 2021/12/04 06:52:58 florian Exp $ */ +/* $OpenBSD: proc.c,v 1.42 2023/02/15 20:44:01 tobhe Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter @@ -43,24 +43,11 @@ void proc_open(struct privsep *, int, int); void proc_accept(struct privsep *, int, enum privsep_procid, unsigned int); void proc_close(struct privsep *); -int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid); void proc_shutdown(struct privsep_proc *); void proc_sig_handler(int, short, void *); void proc_range(struct privsep *, enum privsep_procid, int *, int *); int proc_dispatch_null(int, struct privsep_proc *, struct imsg *); -int -proc_ispeer(struct privsep_proc *procs, unsigned int nproc, - enum privsep_procid type) -{ - unsigned int i; - - for (i = 0; i < nproc; i++) - if (procs[i].p_id == type) - return (1); - return (0); -} - enum privsep_procid proc_getid(struct privsep_proc *procs, unsigned int nproc, const char *proc_name) diff --git a/usr.sbin/relayd/proc.c b/usr.sbin/relayd/proc.c index ce7b056f779..52d27d25df4 100644 --- a/usr.sbin/relayd/proc.c +++ b/usr.sbin/relayd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.43 2022/09/03 20:07:31 benno Exp $ */ +/* $OpenBSD: proc.c,v 1.44 2023/02/15 20:44:01 tobhe Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter @@ -43,24 +43,11 @@ void proc_open(struct privsep *, int, int); void proc_accept(struct privsep *, int, enum privsep_procid, unsigned int); void proc_close(struct privsep *); -int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid); void proc_shutdown(struct privsep_proc *); void proc_sig_handler(int, short, void *); void proc_range(struct privsep *, enum privsep_procid, int *, int *); int proc_dispatch_null(int, struct privsep_proc *, struct imsg *); -int -proc_ispeer(struct privsep_proc *procs, unsigned int nproc, - enum privsep_procid type) -{ - unsigned int i; - - for (i = 0; i < nproc; i++) - if (procs[i].p_id == type) - return (1); - return (0); -} - enum privsep_procid proc_getid(struct privsep_proc *procs, unsigned int nproc, const char *proc_name) diff --git a/usr.sbin/snmpd/proc.c b/usr.sbin/snmpd/proc.c index fd76ac9720a..fe596ff6437 100644 --- a/usr.sbin/snmpd/proc.c +++ b/usr.sbin/snmpd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.27 2020/06/30 17:11:49 martijn Exp $ */ +/* $OpenBSD: proc.c,v 1.28 2023/02/15 20:44:01 tobhe Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter @@ -43,24 +43,11 @@ void proc_open(struct privsep *, int, int); void proc_accept(struct privsep *, int, enum privsep_procid, unsigned int); void proc_close(struct privsep *); -int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid); void proc_shutdown(struct privsep_proc *); void proc_sig_handler(int, short, void *); void proc_range(struct privsep *, enum privsep_procid, int *, int *); int proc_dispatch_null(int, struct privsep_proc *, struct imsg *); -int -proc_ispeer(struct privsep_proc *procs, unsigned int nproc, - enum privsep_procid type) -{ - unsigned int i; - - for (i = 0; i < nproc; i++) - if (procs[i].p_id == type) - return (1); - return (0); -} - enum privsep_procid proc_getid(struct privsep_proc *procs, unsigned int nproc, const char *proc_name) diff --git a/usr.sbin/vmd/proc.c b/usr.sbin/vmd/proc.c index f1152107e0d..c9efad13ef3 100644 --- a/usr.sbin/vmd/proc.c +++ b/usr.sbin/vmd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.19 2021/04/20 21:11:56 dv Exp $ */ +/* $OpenBSD: proc.c,v 1.20 2023/02/15 20:44:01 tobhe Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter @@ -43,24 +43,11 @@ void proc_open(struct privsep *, int, int); void proc_accept(struct privsep *, int, enum privsep_procid, unsigned int); void proc_close(struct privsep *); -int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid); void proc_shutdown(struct privsep_proc *); void proc_sig_handler(int, short, void *); void proc_range(struct privsep *, enum privsep_procid, int *, int *); int proc_dispatch_null(int, struct privsep_proc *, struct imsg *); -int -proc_ispeer(struct privsep_proc *procs, unsigned int nproc, - enum privsep_procid type) -{ - unsigned int i; - - for (i = 0; i < nproc; i++) - if (procs[i].p_id == type) - return (1); - return (0); -} - enum privsep_procid proc_getid(struct privsep_proc *procs, unsigned int nproc, const char *proc_name)