From owner-svn-src-all@freebsd.org Thu Feb 7 23:17:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D541214C88B9; Thu, 7 Feb 2019 23:17:44 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79E3981E83; Thu, 7 Feb 2019 23:17:44 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C8AA7496; Thu, 7 Feb 2019 23:17:44 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x17NHihq034851; Thu, 7 Feb 2019 23:17:44 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x17NHixb034850; Thu, 7 Feb 2019 23:17:44 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201902072317.x17NHixb034850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 7 Feb 2019 23:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343884 - head/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/lib/libc/stdio X-SVN-Commit-Revision: 343884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 79E3981E83 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 23:17:45 -0000 Author: brooks Date: Thu Feb 7 23:17:44 2019 New Revision: 343884 URL: https://svnweb.freebsd.org/changeset/base/343884 Log: 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 Modified: head/lib/libc/stdio/fgetln.c Modified: head/lib/libc/stdio/fgetln.c ============================================================================== --- head/lib/libc/stdio/fgetln.c Thu Feb 7 22:49:49 2019 (r343883) +++ head/lib/libc/stdio/fgetln.c Thu Feb 7 23:17:44 2019 (r343884) @@ -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();