column regression after https://svnweb.freebsd.org/base?view=revision&revision=r320472

Konstantin Belousov kostikbel at gmail.com
Fri Jun 30 18:53:34 UTC 2017


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;


More information about the freebsd-current mailing list