diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2019-02-07 23:17:44 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2019-02-07 23:17:44 +0000 |
commit | 60835849e5016a893443ec72c8005c57f1b5d24c (patch) | |
tree | c4742181ed492361474a5477e8aa442564ac368f /lib/libc/stdio | |
parent | 18bb746b40c05e0517cea94bec5f678f0506916a (diff) |
GC a historical artifact.
Back in 1993, the fgetln (then fgetline) interface was changed to not
return a C string. The change was accomplished by ifdefing out the code
that did the termination. Changing the interface would violate our API
stability rules so remove the old implementation.
Sponsored by: DARPA, AFRL
Notes
Notes:
svn path=/head/; revision=343884
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/fgetln.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/libc/stdio/fgetln.c b/lib/libc/stdio/fgetln.c index ba0736cbb0fc..f3e4a6874a4b 100644 --- a/lib/libc/stdio/fgetln.c +++ b/lib/libc/stdio/fgetln.c @@ -50,19 +50,12 @@ __FBSDID("$FreeBSD$"); /* * Expand the line buffer. Return -1 on error. -#ifdef notdef - * The `new size' does not account for a terminating '\0', - * so we add 1 here. -#endif */ int __slbexpand(FILE *fp, size_t newsize) { void *p; -#ifdef notdef - ++newsize; -#endif if (fp->_lb._size >= newsize) return (0); if (newsize > INT_MAX) { @@ -160,9 +153,6 @@ fgetln(FILE *fp, size_t *lenp) break; } *lenp = len; -#ifdef notdef - fp->_lb._base[len] = '\0'; -#endif ret = (char *)fp->_lb._base; end: FUNLOCKFILE_CANCELSAFE(); |