From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 19 12:50:11 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB3AC106566B for ; Fri, 19 Aug 2011 12:50:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A77408FC1B for ; Fri, 19 Aug 2011 12:50:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7JCoB5p091354 for ; Fri, 19 Aug 2011 12:50:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7JCoBXv091353; Fri, 19 Aug 2011 12:50:11 GMT (envelope-from gnats) Date: Fri, 19 Aug 2011 12:50:11 GMT Message-Id: <201108191250.p7JCoBXv091353@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: bin/159765: commit references a PR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2011 12:50:11 -0000 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"