diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-12-21 17:50:28 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-12-21 17:50:28 +0000 |
commit | 0e81614085afa0bd12deee4476fe3f7d9ca9704b (patch) | |
tree | 4d273bda62a0a3f9cfdcf1c93056ebd08033cabf /usr.sbin | |
parent | 1ccf42103a53707161e2452a5be2ac177f7b6153 (diff) |
Cleanup a few things while reading the code.
OK job@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpki-client/main.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 59edfc543c3..8e96c7ac23b 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.167 2021/11/25 15:03:04 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.168 2021/12/21 17:50:27 claudio Exp $ */ /* * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> @@ -397,22 +397,22 @@ queue_add_from_mft_set(const struct mft *mft) * Add a local TAL file (RFC 7730) to the queue of files to fetch. */ static void -queue_add_tal(const char *file, int id) +queue_add_tal(const char *file, int talid) { unsigned char *buf; char *nfile; size_t len; - if ((nfile = strdup(file)) == NULL) - err(1, NULL); buf = load_file(file, &len); if (buf == NULL) { warn("%s", file); return; } + if ((nfile = strdup(file)) == NULL) + err(1, NULL); /* Not in a repository, so directly add to queue. */ - entityq_add(nfile, RTYPE_TAL, NULL, buf, len, id); + entityq_add(nfile, RTYPE_TAL, NULL, buf, len, talid); } /* @@ -437,8 +437,7 @@ queue_add_from_tal(struct tal *tal) /* steal the pkey from the tal structure */ data = tal->pkey; tal->pkey = NULL; - entityq_add(NULL, RTYPE_CER, repo, data, - tal->pkeysz, tal->id); + entityq_add(NULL, RTYPE_CER, repo, data, tal->pkeysz, tal->id); } /* |