From 129f13dc6e10c8765a1ba2cc8baf9ecfb501daed Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 25 Nov 2021 16:53:58 +0000 Subject: [PATCH] We know how to print a size_t now. Drop a comment and a cast. ok bluhm inoguchi --- usr.bin/openssl/passwd.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/usr.bin/openssl/passwd.c b/usr.bin/openssl/passwd.c index 4033b553723..a8c7f08dd73 100644 --- a/usr.bin/openssl/passwd.c +++ b/usr.bin/openssl/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.10 2019/07/14 03:30:46 guenther Exp $ */ +/* $OpenBSD: passwd.c,v 1.11 2021/11/25 16:53:58 tb Exp $ */ #if defined OPENSSL_NO_MD5 #define NO_MD5CRYPT_1 @@ -449,11 +449,9 @@ do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, /* truncate password if necessary */ if ((strlen(passwd) > pw_maxlen)) { if (!quiet) - /* - * XXX: really we should know how to print a size_t, - * not cast it - */ - BIO_printf(bio_err, "Warning: truncating password to %u characters\n", (unsigned) pw_maxlen); + BIO_printf(bio_err, + "Warning: truncating password to %zu characters\n", + pw_maxlen); passwd[pw_maxlen] = 0; } assert(strlen(passwd) <= pw_maxlen); -- 2.20.1