summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
af4a4f3)
The function used to return early, but these days that's just avoiding a
single statement, so execute that conditionally instead.
/*
* discard.c -- discard output on a file pointer
*
/*
* discard.c -- discard output on a file pointer
*
void
discard (FILE *io)
{
void
discard (FILE *io)
{
- if (io == NULL)
- return;
-
- tcflush (fileno(io), TCOFLUSH);
-
- /* There used to be an fpurge() here on some platforms, stdio
- hackery on others. But it didn't seem necessary. */
+ if (io)
+ tcflush (fileno(io), TCOFLUSH);