From 2499cd9d9be0ba74e16a6c3dd304e6d69070be35 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 19 Jun 2012 00:05:35 -0400 Subject: remove flush hook cruft that was never used from stdio there is no need/use for a flush hook. the write function serves this purpose already. i originally created the hook for implementing mem streams based on a mistaken reading of posix, and later realized it wasn't useful but never removed it until now. --- src/stdio/fflush.c | 3 --- src/stdio/freopen.c | 1 - 2 files changed, 4 deletions(-) (limited to 'src/stdio') diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c index 4c1647b7..715c1d10 100644 --- a/src/stdio/fflush.c +++ b/src/stdio/fflush.c @@ -15,9 +15,6 @@ static int __fflush_unlocked(FILE *f) f->wpos = f->wbase = f->wend = 0; f->rpos = f->rend = 0; - /* Hook for special behavior on flush */ - if (f->flush) f->flush(f); - return 0; } diff --git a/src/stdio/freopen.c b/src/stdio/freopen.c index 958dbd20..b1f8fe71 100644 --- a/src/stdio/freopen.c +++ b/src/stdio/freopen.c @@ -32,7 +32,6 @@ FILE *freopen(const char *filename, const char *mode, FILE *f) f->write = f2->write; f->seek = f2->seek; f->close = f2->close; - f->flush = f2->flush; fclose(f2); return f; -- cgit v1.2.1