]> pd.if.org Git - pdclib/blobdiff - functions/string/strerror.c
Reworked errno. Added values from Linux / Windows. Added error texts. Some errno...
[pdclib] / functions / string / strerror.c
index 0ed494d03d030f6660254459e9639ac292b7dab7..47e064be43324deb746ae2110ee8cb0002479911 100644 (file)
 /* TODO: Doing this via a static array is not the way to do it. */
 char * strerror( int errnum )
 {
-    if ( errnum == 0 || errnum >= _PDCLIB_ERRNO_MAX )
+    if ( errnum >= _PDCLIB_ERRNO_MAX )
     {
         return (char *)"Unknown error";
     }
     else
     {
-        return _PDCLIB_threadlocale()->_ErrnoStr[errnum];
+        return (char *)_PDCLIB_threadlocale()->_ErrnoStr[errnum];
     }
 }