diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-11-12 09:23:08 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-11-12 09:23:08 +0000 |
commit | d9ccba3f05a1bc7c5fc3d9b7d70dd24849bc38b7 (patch) | |
tree | 8f2cbba003b8a41aa02e31570068f3ee10520427 /usr.sbin/rpki-client/geofeed.c | |
parent | 31006278189f03155a4938e712fd31794c79ec50 (diff) |
Rename ips/as and ipsz/asz to ips/ases, num_ips/num_ases
Having a single letter to distinguish a length from a pointer is error
prone. This results in binary change only in validate.c and cert.c due
to a line wrap resulting in line number changes and in cert.c there's in
addition two asserts that change.
checked with/ok job
Diffstat (limited to 'usr.sbin/rpki-client/geofeed.c')
-rw-r--r-- | usr.sbin/rpki-client/geofeed.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/rpki-client/geofeed.c b/usr.sbin/rpki-client/geofeed.c index f7d321fa35f..0c89143250f 100644 --- a/usr.sbin/rpki-client/geofeed.c +++ b/usr.sbin/rpki-client/geofeed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: geofeed.c,v 1.16 2024/02/21 09:17:06 tb Exp $ */ +/* $OpenBSD: geofeed.c,v 1.17 2024/11/12 09:23:07 tb Exp $ */ /* * Copyright (c) 2022 Job Snijders <job@fastly.com> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> @@ -68,11 +68,11 @@ geofeed_parse_geoip(struct geofeed *geofeed, char *cidr, char *loc) ipaddr->prefixlen = plen; - geofeed->geoips = recallocarray(geofeed->geoips, geofeed->geoipsz, - geofeed->geoipsz + 1, sizeof(struct geoip)); + geofeed->geoips = recallocarray(geofeed->geoips, geofeed->num_geoips, + geofeed->num_geoips + 1, sizeof(struct geoip)); if (geofeed->geoips == NULL) err(1, NULL); - geoip = &geofeed->geoips[geofeed->geoipsz++]; + geoip = &geofeed->geoips[geofeed->num_geoips++]; if ((geoip->ip = calloc(1, sizeof(struct cert_ip))) == NULL) err(1, NULL); @@ -253,7 +253,7 @@ geofeed_parse(X509 **x509, const char *fn, int talid, char *buf, size_t len) goto out; } - if (cert->asz > 0) { + if (cert->num_ases > 0) { warnx("%s: superfluous AS Resources extension present", fn); goto out; } @@ -288,7 +288,7 @@ geofeed_free(struct geofeed *p) if (p == NULL) return; - for (i = 0; i < p->geoipsz; i++) { + for (i = 0; i < p->num_geoips; i++) { free(p->geoips[i].ip); free(p->geoips[i].loc); } |