From owner-cvs-all@FreeBSD.ORG Mon Jan 10 12:22:28 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E82816A4CE; Mon, 10 Jan 2005 12:22:28 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4EDE43D3F; Mon, 10 Jan 2005 12:22:27 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])j0ACMPhm019055; Mon, 10 Jan 2005 14:22:26 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) j0ACMPk6002887; Mon, 10 Jan 2005 14:22:25 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost)j0ACMP2i002886; Mon, 10 Jan 2005 14:22:25 +0200 (EET) (envelope-from keramida@freebsd.org) Date: Mon, 10 Jan 2005 14:22:25 +0200 From: Giorgos Keramidas To: Brian Somers Message-ID: <20050110122225.GB2693@orion.daedalusnetworks.priv> References: <200501101112.j0ABCaEQ062701@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200501101112.j0ABCaEQ062701@repoman.freebsd.org> cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/usr.sbin/ppp route.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2005 12:22:28 -0000 On 2005-01-10 11:12, Brian Somers wrote: > > Cast unsigned variables to int > > Revision Changes Path > 1.94 +1 -1 src/usr.sbin/ppp/route.c % static void % p_flags(struct prompt *prompt, u_int32_t f, unsigned max) % { % char name[33], *flags; % register struct bits *p = bits; % % if (max > sizeof name - 1) % max = sizeof name - 1; % % for (flags = name; p->b_mask && flags - name < (int)max; p++) % if (p->b_mask & f) % *flags++ = p->b_val; % *flags = '\0'; % - prompt_Printf(prompt, "%-*.*s", max, max, name); % + prompt_Printf(prompt, "%-*.*s", (int)max, (int)max, name); % } Hi Brian, Since p_flags is used only once in route.c can't we just fix the type of `max' in the argument list of p_flags() to avoid the need for casts altogether?