diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-08-27 13:52:46 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-08-27 14:36:18 +0200 |
commit | 03ad444e8e086391f53d87c3949e0d44adef4bc3 (patch) | |
tree | 4c0e10d5b76d4b88b37ce2749c963b4f1e5a2834 /sysdeps/mach | |
parent | d0e357ff45a75553dee3b17ed7d303bfa544f6fe (diff) | |
download | glibc-03ad444e8e086391f53d87c3949e0d44adef4bc3.tar glibc-03ad444e8e086391f53d87c3949e0d44adef4bc3.tar.gz glibc-03ad444e8e086391f53d87c3949e0d44adef4bc3.tar.bz2 glibc-03ad444e8e086391f53d87c3949e0d44adef4bc3.zip |
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
Diffstat (limited to 'sysdeps/mach')
-rw-r--r-- | sysdeps/mach/_strerror.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/mach/_strerror.c b/sysdeps/mach/_strerror.c index b179c440d3..acc00612bb 100644 --- a/sysdeps/mach/_strerror.c +++ b/sysdeps/mach/_strerror.c @@ -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; } |