Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2017 21:53:28 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Oleg Ginzburg <olevole@olevole.ru>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, eugen@freebsd.org, Jilles Tjoelker <jilles@freebsd.org>, emaste@freebsd.org, Eric van Gyzen <vangyzen@freebsd.org>
Subject:   Re: column regression after https://svnweb.freebsd.org/base?view=revision&revision=r320472
Message-ID:  <20170630185328.GW1935@kib.kiev.ua>
In-Reply-To: <1578549.T7vdc21kZj@gizmo.my.domain>
References:  <1578549.T7vdc21kZj@gizmo.my.domain>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 30, 2017 at 09:34:42PM +0300, Oleg Ginzburg wrote:
> Hi,
> 
> This commit https://svnweb.freebsd.org/base?view=revision&revision=r320472 
> breaks column(1) (and can affect something else this way ). Try to execute 
> sample from man r320472:
> 
> ( printf "PERM LINKS OWNER GROUP SIZE MONTH DAY " ; printf "HH:MM/YEAR NAME\n" 
> ; ls -l | sed 1d ) | column -t
> 
> column: line too long
> 

Indeed, there is a typo.  The following fixed the issue for me.

diff --git a/lib/libc/stdio/fgetws.c b/lib/libc/stdio/fgetws.c
index 83d697ea958..f47fea79934 100644
--- a/lib/libc/stdio/fgetws.c
+++ b/lib/libc/stdio/fgetws.c
@@ -116,7 +116,7 @@ ok:
 	ret = ws;
 end:
 	FUNLOCKFILE_CANCELSAFE();
-	return (ws);
+	return (ret);
 
 error:
 	ret = NULL;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170630185328.GW1935>