BIO_printf() is a wrapper around vfprintf, so we can remove this comment
and the cast.

Index: passwd.c
===================================================================
RCS file: /cvs/src/usr.bin/openssl/passwd.c,v
retrieving revision 1.10
diff -u -p -r1.10 passwd.c
--- passwd.c    14 Jul 2019 03:30:46 -0000      1.10
+++ passwd.c    24 Nov 2021 19:50:35 -0000
@@ -449,11 +449,9 @@ do_passwd(int passed_salt, char **salt_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);

Reply via email to