Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Dec 2012 04:20:01 GMT
From:      Mark Johnston <markjdb@gmail.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/174521: printf(1) doesn&#39;t treat extra conversion specifiers as zero (posix)
Message-ID:  <201212180420.qBI4K1tD085286@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/174521; it has been noted by GNATS.

From: Mark Johnston <markjdb@gmail.com>
To: bug-followup@FreeBSD.org, danielsh@elego.de
Cc:  
Subject: Re: bin/174521: printf(1) doesn&#39;t treat extra conversion
 specifiers as zero (posix)
Date: Mon, 17 Dec 2012 23:12:50 -0500

 --2oS5YaxWCcQjTEyO
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 The fix for this is pretty easy - a patch is attached.
 
 -Mark
 
 --2oS5YaxWCcQjTEyO
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="printf_no_specifier.patch"
 
 diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
 index 4b09342..2368f18 100644
 --- a/usr.bin/printf/printf.c
 +++ b/usr.bin/printf/printf.c
 @@ -473,7 +473,7 @@ getnum(intmax_t *ip, uintmax_t *uip, int signedconv)
  	int rval;
  
  	if (!*gargv) {
 -		*ip = 0;
 +		*ip = *uip = 0;
  		return (0);
  	}
  	if (**gargv == '"' || **gargv == '\'') {
 
 --2oS5YaxWCcQjTEyO--



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