Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2014 21:24:56 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r265977 - head/usr.bin/printf
Message-ID:  <201405132124.s4DLOuMt004216@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Tue May 13 21:24:55 2014
New Revision: 265977
URL: http://svnweb.freebsd.org/changeset/base/265977

Log:
  printf: Fix missing arguments for %u/%o/%x/%X after r265592.
  
  If a numeric argument is missing, zero should be assumed, for signed as well
  as unsigned conversions.
  
  This fixes the 'zero' regression tests.
  
  r265592 erroneously reverted r244407.

Modified:
  head/usr.bin/printf/printf.c

Modified: head/usr.bin/printf/printf.c
==============================================================================
--- head/usr.bin/printf/printf.c	Tue May 13 21:23:49 2014	(r265976)
+++ head/usr.bin/printf/printf.c	Tue May 13 21:24:55 2014	(r265977)
@@ -575,7 +575,7 @@ getnum(intmax_t *ip, uintmax_t *uip, int
 	int rval;
 
 	if (!*gargv) {
-		*ip = 0;
+		*ip = *uip = 0;
 		return (0);
 	}
 	if (**gargv == '"' || **gargv == '\'') {



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