#define ferror(f) ((f)->flags & F_ERR)
#define getc_unlocked(f) \
- ( ((f)->rpos < (f)->rend) ? *(f)->rpos++ : __uflow((f)) )
+ ( ((f)->rpos != (f)->rend) ? *(f)->rpos++ : __uflow((f)) )
#define putc_unlocked(c, f) \
- ( ((unsigned char)(c)!=(f)->lbf && (f)->wpos<(f)->wend) \
+ ( ((unsigned char)(c)!=(f)->lbf && (f)->wpos!=(f)->wend) \
? *(f)->wpos++ = (c) : __overflow((f),(c)) )
/* Caller-allocated FILE * operations */