From 1549bb4d2d6a3042ca56e89353316edf6a046118 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 7 Apr 2021 16:06:37 +0000 Subject: [PATCH] minor KNF found while hunting for a bug --- usr.sbin/rpki-client/http.c | 3 ++- usr.sbin/rpki-client/main.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rpki-client/http.c b/usr.sbin/rpki-client/http.c index 58067ee2bb4..250ba22de4c 100644 --- a/usr.sbin/rpki-client/http.c +++ b/usr.sbin/rpki-client/http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: http.c,v 1.19 2021/04/07 14:26:21 claudio Exp $ */ +/* $OpenBSD: http.c,v 1.20 2021/04/07 16:06:37 deraadt Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2020 Claudio Jeker @@ -1176,6 +1176,7 @@ proc_http(char *bind_addr, int fd) active_connections = 0; for (i = 0; i < MAX_CONNECTIONS; i++) { struct http_connection *conn = http_conns[i]; + if (conn == NULL) { pfds[i].fd = -1; continue; diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 3069175aabe..dc7d2548e05 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.130 2021/04/01 16:40:05 tb Exp $ */ +/* $OpenBSD: main.c,v 1.131 2021/04/07 16:06:37 deraadt Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -572,7 +572,7 @@ tal_load_default(const char *tals[], size_t max) err(1, NULL); tals[s++] = path; } - closedir (dirp); + closedir(dirp); return s; } -- 2.20.1