Ticket #112: perror.patch

File perror.patch, 387 bytes (added by Lukáš Zaoral, 4 years ago)
  • dios/libc/stdio/perror.c

    diff -u a/dios/libc/stdio/perror.c b/dios/libc/stdio/perror.c
    a b  
    1313/* TODO: Doing this via a static array is not the way to do it. */
    1414void perror( const char * s )
    1515{
    16     if ( ( s != NULL ) && ( s[0] != '\n' ) )
     16    if ( ( s != NULL ) && ( *s != '\0' ) )
    1717    {
    1818        fprintf( stderr, "%s: ", s );
    1919    }