From: job Date: Sun, 1 Aug 2021 22:29:49 +0000 (+0000) Subject: %i is going out of vogue, use %d instead X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8ab20fcdaed7622dbbbf217b7d48250d1c04c156;p=openbsd %i is going out of vogue, use %d instead also clean up a comment OK tb@ --- 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 * @@ -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; }