summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/roa.c
diff options
context:
space:
mode:
authorjob <job@cvs.openbsd.org>2021-08-01 22:29:50 +0000
committerjob <job@cvs.openbsd.org>2021-08-01 22:29:50 +0000
commit4d31e994aafefae2b8920ccb4185274588266b14 (patch)
treed92477f93a028948492b8d80d5f79efe0e685ef3 /usr.sbin/rpki-client/roa.c
parent540fd063c85d65b64218be1346a1e5340ada3ce7 (diff)
%i is going out of vogue, use %d instead
also clean up a comment OK tb@
Diffstat (limited to 'usr.sbin/rpki-client/roa.c')
-rw-r--r--usr.sbin/rpki-client/roa.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.sbin/rpki-client/roa.c b/usr.sbin/rpki-client/roa.c
index 954f5afa619..787243dd407 100644
--- a/usr.sbin/rpki-client/roa.c
+++ b/usr.sbin/rpki-client/roa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: roa.c,v 1.22 2021/07/28 12:32:14 job Exp $ */
+/* $OpenBSD: roa.c,v 1.23 2021/08/01 22:29:49 job Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -90,13 +90,8 @@ roa_parse_addr(const ASN1_OCTET_STRING *os, enum afi afi, struct parse *p)
p->fn, ASN1_tag2str(t->type), t->type);
goto out;
}
- maxlength = t->value.integer;
- /*
- * It's safe to use ASN1_INTEGER_get() here
- * because we're not going to have more than signed 32
- * bit maximum of length.
- */
+ maxlength = t->value.integer;
maxlen = ASN1_INTEGER_get(maxlength);
if (maxlen < 0) {
warnx("%s: RFC 6482 section 3.2: maxLength: "
@@ -104,7 +99,7 @@ roa_parse_addr(const ASN1_OCTET_STRING *os, enum afi afi, struct parse *p)
goto out;
}
if (addr.prefixlen > maxlen) {
- warnx("%s: prefixlen (%i) larger than maxLength (%ld)",
+ warnx("%s: prefixlen (%d) larger than maxLength (%ld)",
p->fn, addr.prefixlen, maxlen);
goto out;
}