git-strerror_X
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sat, 10 Sep 2022 22:05:13 +0000 (23:05 +0100)
committerAurelien Jarno <aurel32@debian.org>
Sat, 10 Sep 2022 22:05:13 +0000 (23:05 +0100)
commit 03ad444e8e086391f53d87c3949e0d44adef4bc3
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Aug 27 13:52:46 2022 +0200

    mach: Fix incoherency between perror and strerror

    08d2024b4167 ("string: Simplify strerror_r") inadvertently made
    __strerror_r print unknown error system in decimal while the original
    code was printing it in hexadecimal. perror was kept printing in
    hexadecimal in 725eeb4af14c ("string: Use tls-internal on strerror_l"),
    let us keep both coherent.

    This also fixes a duplicate ':'

    Spotted by the libunistring testsuite test-perror2

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-strerror_X.diff

sysdeps/mach/_strerror.c

index babd35c12d90d52559c54f0d59cc093d2e8664b2..b5ac0259b1c94858d2f7d3cae673579641e92f56 100644 (file)
@@ -40,7 +40,7 @@ __strerror_r (int errnum, char *buf, size_t buflen)
 
   if (system > err_max_system || ! __mach_error_systems[system].bad_sub)
     {
-      __snprintf (buf, buflen, "%s: %d", _("Error in unknown error system: "),
+      __snprintf (buf, buflen, "%s%X", _("Error in unknown error system: "),
                  errnum);
       return buf;
     }