diff options
Diffstat (limited to 'sysdeps/generic/_strerror.c')
-rw-r--r-- | sysdeps/generic/_strerror.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/generic/_strerror.c b/sysdeps/generic/_strerror.c index 0d069f84c5..72ebb216bf 100644 --- a/sysdeps/generic/_strerror.c +++ b/sysdeps/generic/_strerror.c @@ -33,13 +33,12 @@ _strerror_internal (errnum, buf, buflen) { if (errnum < 0 || errnum > _sys_nerr) { - static char fmt[] = "Unknown error %d"; - size_t len = snprintf (buf, buflen, fmt, errnum); - if (len < sizeof (fmt) - 2) + int len = __snprintf (buf, buflen, _("Unknown error %d"), errnum); + if (len < 0) return NULL; buf[len - 1] = '\0'; return buf; } - return (char *) _sys_errlist[errnum]; + return (char *) _(_sys_errlist[errnum]); } |