From: deraadt Date: Wed, 7 Apr 2021 16:06:37 +0000 (+0000) Subject: minor KNF found while hunting for a bug X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1549bb4d2d6a3042ca56e89353316edf6a046118;p=openbsd minor KNF found while hunting for a bug --- 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; }