The following reply was made to PR bin/159765; it has been noted by GNATS.

From: [email protected] (dfilter service)
To: [email protected]
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;
 _______________________________________________
 [email protected] mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "[email protected]"
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to