Changeset 1722


Ignore:
Timestamp:
Jan 28, 2007, 1:21:58 AM (16 years ago)
Author:
Sam Hocevar
Message:
  • Better debug messages for special cases (eg. fgetc returning -1).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/lib-stream.c

    r1719 r1722  
    301301        _zz_unlock(fd); \
    302302        FGETC_FUZZ \
    303         debug("%s([%i]) = '%c'", __func__, fd, ret); \
     303        if(ret < 0)
     304            debug("%s([%i]) = %i", __func__, fd, ret); \
     305        else
     306            debug("%s([%i]) = '%c'", __func__, fd, ret); \
    304307    } while(0)
    305308
     
    402405    }
    403406
    404     debug("%s(0x%02x, [%i]) = '%c'", __func__, c, fd, ret);
     407    if(ret < 0)
     408        debug("%s(0x%02x, [%i]) = %i", __func__, c, fd, ret);
     409    else
     410        debug("%s(0x%02x, [%i]) = '%c'", __func__, c, fd, ret);
     411
    405412    return ret;
    406413}
Note: See TracChangeset for help on using the changeset viewer.