From owner-svn-src-all@freebsd.org Tue Feb 9 09:37:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DB8EAA29B8; Tue, 9 Feb 2016 09:37:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DAD1134C; Tue, 9 Feb 2016 09:37:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u199b4iE058216; Tue, 9 Feb 2016 09:37:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u199b4G8058215; Tue, 9 Feb 2016 09:37:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201602090937.u199b4G8058215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 Feb 2016 09:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295427 - head/bin/dd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2016 09:37:05 -0000 Author: trasz Date: Tue Feb 9 09:37:04 2016 New Revision: 295427 URL: https://svnweb.freebsd.org/changeset/base/295427 Log: Use a proper type for return value of postfix_to_mult(); the way it's being used wouldn't work if the value returned didn't fit in intmax_t. Submitted by: bde@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/bin/dd/args.c Modified: head/bin/dd/args.c ============================================================================== --- head/bin/dd/args.c Tue Feb 9 09:32:10 2016 (r295426) +++ head/bin/dd/args.c Tue Feb 9 09:37:04 2016 (r295427) @@ -360,10 +360,10 @@ c_conv(const void *a, const void *b) ((const struct conv *)b)->name)); } -static uintmax_t +static intmax_t postfix_to_mult(const char expr) { - uintmax_t mult; + intmax_t mult; mult = 0; switch (expr) {