Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 12:50:11 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/159765: commit references a PR
Message-ID:  <201108191250.p7JCoBXv091353@freefall.freebsd.org>

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/159765: commit references a PR
Date: Fri, 19 Aug 2011 12:48:20 +0000 (UTC)

 Author: ae
 Date: Fri Aug 19 12:48:06 2011
 New Revision: 225007
 URL: http://svn.freebsd.org/changeset/base/225007
 
 Log:
   The decimal() function was changed in r217808 to take the
   maximum value instead of number of bits. But for case when
   limitation is not needed it erroneously skips conversion to
   number and always returns zero. So, don't skip conversion
   for case when limitation is not needed.
   
   PR:		bin/159765
   Approved by:	re (kib)
 
 Modified:
   head/sbin/fdisk/fdisk.c
 
 Modified: head/sbin/fdisk/fdisk.c
 ==============================================================================
 --- head/sbin/fdisk/fdisk.c	Fri Aug 19 12:08:54 2011	(r225006)
 +++ head/sbin/fdisk/fdisk.c	Fri Aug 19 12:48:06 2011	(r225007)
 @@ -940,7 +940,7 @@ decimal(const char *str, int *num, int d
  			return 0;
  		while ((c = *cp++)) {
  			if (c <= '9' && c >= '0') {
 -				if (maxval > 0 && acc <= maxval)
 +				if (acc <= maxval || maxval == 0)
  					acc = acc * 10 + c - '0';
  			} else
  				break;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



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