X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstring%2Fstrerror.c;h=8c9f8764b7b2eb45ed15d1f486671b258981e2b9;hb=d7154dc8cd1b7d41d0d956b7310e59d794f1a59f;hp=2b776405d085d9805a734192f239e95a05e4fc8e;hpb=d6f1494a4f38a212b29a13ee713885058dcf0fe7;p=pdclib diff --git a/functions/string/strerror.c b/functions/string/strerror.c index 2b77640..8c9f876 100644 --- a/functions/string/strerror.c +++ b/functions/string/strerror.c @@ -13,7 +13,7 @@ /* 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"; } @@ -26,6 +26,7 @@ char * strerror( int errnum ) #endif #ifdef TEST + #include "_PDCLIB_test.h" #include @@ -36,4 +37,5 @@ int main( void ) TESTCASE( strerror( ERANGE ) != strerror( EDOM ) ); return TEST_RESULTS; } + #endif