From owner-cvs-src@FreeBSD.ORG Wed Sep 5 14:27:13 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C620716A41A; Wed, 5 Sep 2007 14:27:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9C4E213C4B5; Wed, 5 Sep 2007 14:27:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l85ERDeB053339; Wed, 5 Sep 2007 14:27:13 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from pjd@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l85ERDxo053338; Wed, 5 Sep 2007 14:27:13 GMT (envelope-from pjd) Message-Id: <200709051427.l85ERDxo053338@repoman.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 5 Sep 2007 14:27:13 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libutil expand_number.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2007 14:27:13 -0000 pjd 2007-09-05 14:27:13 UTC FreeBSD src repository Modified files: lib/libutil expand_number.c Log: - Fix strange for loop. Reported by: phk - While here, check the unit before calculating the actually number. This way we can return EINVAL for invalid unit instead of ERANGE. Approved by: re (kensmith) Revision Changes Path 1.2 +16 -6 src/lib/libutil/expand_number.c