From: dv Date: Wed, 31 Aug 2022 16:17:18 +0000 (+0000) Subject: relayd(8): change agentx_getsock to return void X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4172793d0f863cf55eae24d9a15a6e2768524bf2;p=openbsd relayd(8): change agentx_getsock to return void Only has one return value and it's never checked. ok martijn@, tb@ --- diff --git a/usr.sbin/relayd/agentx_control.c b/usr.sbin/relayd/agentx_control.c index f4f5429d7e0..113ae0482fc 100644 --- a/usr.sbin/relayd/agentx_control.c +++ b/usr.sbin/relayd/agentx_control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agentx_control.c,v 1.5 2021/08/31 13:19:29 martijn Exp $ */ +/* $OpenBSD: agentx_control.c,v 1.6 2022/08/31 16:17:18 dv Exp $ */ /* * Copyright (c) 2020 Martijn van Duren @@ -458,7 +458,7 @@ agentx_setsock(struct relayd *lenv, enum privsep_procid id) proc_compose_imsg(lenv->sc_ps, id, -1, IMSG_AGENTXSOCK, -1, s, NULL, 0); } -int +void agentx_getsock(struct imsg *imsg) { struct timeval tv = AGENTX_RECONNECT_TIMEOUT; @@ -473,11 +473,9 @@ agentx_getsock(struct imsg *imsg) agentx_connect(sa, imsg->fd); - return 0; retry: evtimer_set(&env->sc_agentxev, agentx_sock, env); evtimer_add(&env->sc_agentxev, &tv); - return 0; } void diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index 54e26e646fa..9046dfcc4cd 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.187 2021/07/12 15:09:21 beck Exp $ */ +/* $OpenBSD: relayd.c,v 1.188 2022/08/31 16:17:18 dv Exp $ */ /* * Copyright (c) 2007 - 2016 Reyk Floeter @@ -431,7 +431,7 @@ parent_dispatch_pfe(int fd, struct privsep_proc *p, struct imsg *imsg) parent_configure_done(env); break; case IMSG_AGENTXSOCK: - (void)agentx_setsock(env, p->p_id); + agentx_setsock(env, p->p_id); break; default: return (-1); diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h index 2236d140f7e..35775d1b565 100644 --- a/usr.sbin/relayd/relayd.h +++ b/usr.sbin/relayd/relayd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.h,v 1.268 2021/07/25 20:31:41 benno Exp $ */ +/* $OpenBSD: relayd.h,v 1.269 2022/08/31 16:17:18 dv Exp $ */ /* * Copyright (c) 2006 - 2016 Reyk Floeter @@ -1398,7 +1398,7 @@ void tag_ref(u_int16_t); /* agentx_control.c */ void agentx_init(struct relayd *); void agentx_setsock(struct relayd *, enum privsep_procid); -int agentx_getsock(struct imsg *); +void agentx_getsock(struct imsg *); void snmp_hosttrap(struct relayd *, struct table *, struct host *); /* shuffle.c */