From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 08:51:08 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB4DD1065670; Wed, 2 Sep 2009 08:51:08 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 45BFF8FC0C; Wed, 2 Sep 2009 08:51:07 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id n828e5nO017493; Wed, 2 Sep 2009 12:40:05 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1251880805; bh=w/+vFpBXsBWUC4DDcWE/qU/xnS9dfUShgvb0jOu2yfc=; l=724; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=j9spOs+/nv66HyD9adr1S+K1Ef/i+Umw1vVLfa8mxZNFz6Y2a+YHshnoPtCu1QtjC uBsxbAK8xB9cj0PTnqJZ+n7RdyIWo83PpUWLZdknGDPcEuA/cHwacS/UC1HCvBJREU NDGjR5vu+KeOHvNmgwv9e3z9lJ2v2sMcvAZIseEE= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id n828e3Do017492; Wed, 2 Sep 2009 12:40:04 +0400 (MSD) (envelope-from ache) Date: Wed, 2 Sep 2009 12:40:03 +0400 From: Andrey Chernov To: "Simon L. Nielsen" Message-ID: <20090902084002.GA17325@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , "Simon L. Nielsen" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090902070808.GA1290@arthur.nitro.dk> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 08:51:09 -0000 On Wed, Sep 02, 2009 at 09:08:09AM +0200, Simon L. Nielsen wrote: > > Log: > > Use (unsigned char) cast for ctype macro > > Acording to the manual page and the C standard book I have, isdigit() > takes an int for an argument, so why change this? Not exactly that. From our manual page: "The value of the argument must be representable as an unsigned char or the value of EOF." Signed char (automatically casted to int in expression even without direct (int) cast) passed to any ctype macro potentically may cause a lot of problems, such as: incorrect char class detection or even core dump in some systems. This is due to automatic sign extension of 8bit (if present). -- http://ache.pp.ru/