From dc8afe7e464b11d637ab0cfc318b698bdc626cea Mon Sep 17 00:00:00 2001 From: job Date: Sun, 10 Oct 2021 21:57:43 +0000 Subject: [PATCH] Make style consistent and remove an unused code path OK tb@ --- usr.sbin/rpki-client/extern.h | 6 +++--- usr.sbin/rpki-client/main.c | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/usr.sbin/rpki-client/extern.h b/usr.sbin/rpki-client/extern.h index 13f4dd29567..f1ea862904b 100644 --- a/usr.sbin/rpki-client/extern.h +++ b/usr.sbin/rpki-client/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.69 2021/10/07 08:30:39 claudio Exp $ */ +/* $OpenBSD: extern.h,v 1.70 2021/10/10 21:57:43 job Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -316,7 +316,7 @@ enum publish_type { * An entity (MFT, ROA, certificate, etc.) that needs to be downloaded * and parsed. */ -struct entity { +struct entity { enum rtype type; /* type of entity (not RTYPE_EOF) */ char *file; /* local path to file */ int has_pkey; /* whether pkey/sz is specified */ @@ -335,7 +335,7 @@ RB_HEAD(filepath_tree, filepath); /* * Statistics collected during run-time. */ -struct stats { +struct stats { size_t tals; /* total number of locators */ size_t mfts; /* total number of manifests */ size_t mfts_fail; /* failing syntactic parse */ diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 8ebaaa5c800..2213765cf93 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.146 2021/10/05 11:20:46 job Exp $ */ +/* $OpenBSD: main.c,v 1.147 2021/10/10 21:57:43 job Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -627,7 +627,7 @@ main(int argc, char *argv[]) { int rc, c, st, proc, rsync, http, rrdp, ok, hangup = 0, fl = SOCK_STREAM | SOCK_CLOEXEC; - size_t i, id, outsz = 0, talsz = 0; + size_t i, id, talsz = 0; pid_t pid, procpid, rsyncpid, httppid, rrdppid; int fd[2]; struct pollfd pfd[NPFD]; @@ -1176,10 +1176,6 @@ main(int argc, char *argv[]) /* Memory cleanup. */ repo_free(); - for (i = 0; i < outsz; i++) - roa_free(out[i]); - free(out); - return rc; usage: -- 2.20.1