From owner-svn-src-all@FreeBSD.ORG Sat Feb 7 19:17:10 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB2B71065670; Sat, 7 Feb 2009 19:17:10 +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 1C82F8FC1A; Sat, 7 Feb 2009 19:17:09 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id n17J4Ini001816; Sat, 7 Feb 2009 22:04:18 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1234033459; bh=C+pWsuZf9xQKUO7FlMSGFhUdOBFN3QIgeY9wN6B QN/A=; l=806; h=Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=ncVrQR/FPbM2uiU9nrm1UIXLO 1Qs08R7uey/dKKF6Xg+04PYJHlBfzE2C2QeeAceLi5rBH+A3U0rq/gneK0UBuADnIxm ugfxa3BPx6qm4UZqCnKhJY8eZw4nL0hftfQLWKEVI9CSlZmCB1+5C9n6Nm33Y+NMxVA uanauXEXwPCM= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id n17J4ItI001814; Sat, 7 Feb 2009 22:04:18 +0300 (MSK) (envelope-from ache) Date: Sat, 7 Feb 2009 22:04:18 +0300 From: Andrey Chernov To: Warner Losh Message-ID: <20090207190418.GA336@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Warner Losh , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <200902032025.n13KPaCV041012@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902032025.n13KPaCV041012@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r188098 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 07 Feb 2009 19:17:11 -0000 On Tue, Feb 03, 2009 at 08:25:36PM +0000, Warner Losh wrote: > ============================================================================== > --- head/lib/libc/string/memchr.c Tue Feb 3 20:01:51 2009 (r188097) > +++ head/lib/libc/string/memchr.c Tue Feb 3 20:25:36 2009 (r188098) > @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); > #include > > void * > -memchr(const void *s, unsigned char c, size_t n) > +memchr(const void *s, int c, size_t n) > { > if (n != 0) { > const unsigned char *p = s; You just broke comparison with negative chars, as memchr(3) says: "The memchr() function locates the first occurrence of c (converted to an unsigned char)" Please change if (*p++ == c) to if (*p++ == (unsigned char)c) (as in memrchr.c) -- http://ache.pp.ru/