DRAFT lib: strerror: Fix typo, fix static message.
* lib/string/strerror.c (strerror): Fix typo, always show error number.
This commit is contained in:
parent
7cbe2b1152
commit
502b7c1eea
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -77,5 +77,7 @@ strerror (int errnum)
|
||||||
}
|
}
|
||||||
if (errnum > 0 && errnum <= sys_nerr)
|
if (errnum > 0 && errnum <= sys_nerr)
|
||||||
return sys_errlist[errnum];
|
return sys_errlist[errnum];
|
||||||
return "sterror: unknown error";
|
static char buf[40] = "strerror: unknown error: ";
|
||||||
|
strcat (buf, itoa (errnum));
|
||||||
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue