From owner-freebsd-arm@FreeBSD.ORG Thu Apr 30 05:21:37 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25DEB106566C for ; Thu, 30 Apr 2009 05:21:37 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id D00AA8FC18 for ; Thu, 30 Apr 2009 05:21:31 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so1015037ywe.13 for ; Wed, 29 Apr 2009 22:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Y+uW9CrfxJuZf43A2yMTlDiS0m02rKT5upCzi/s7W5Q=; b=EnlyTMjJuax758C+Yrgm3xhyCh2GOKeq5/bPb1dhCmPAKBprvUVR+B0zSgGY4dN5lU U5/5PwIjfFvrdB+Hc7uAsROn21V/A68YKEj95FelXpBny840CJKiaNBt4KCv2YKI0c5F QVgns1vBLvdlLVHPmcD7vdtzppzY6INnVBviA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=N13u9b8hrJ8vip9Oh7hiFUB0gvaqXQM4jRGhAOUmSBVR+Bv7/zJhFhgTR3eYLRbrf4 XoFg4cgg/Lt1Fi7x8vyE/WLT5kBBbGVC0ig5hiwH8Sdsrb369+l/cq0aubPXQ7j6QkUT WPN/hX2hpTGJwkz2n4VqkzRj5OTAaOuwa4Ypg= MIME-Version: 1.0 Received: by 10.100.231.16 with SMTP id d16mr2505477anh.18.1241068891024; Wed, 29 Apr 2009 22:21:31 -0700 (PDT) In-Reply-To: <20090429221236.GA28784@ci0.org> References: <515c64960904280252sc9fe2afy24e8db8ab13b13e4@mail.gmail.com> <1240918262.85945.1.camel@buffy.york.ac.uk> <20090428115510.GA98699@ci0.org> <515c64960904280459p3c2ef8bdu3600157eb0c47bcc@mail.gmail.com> <20090428121255.GA99020@ci0.org> <515c64960904280702s5e29f916s5e03564adf96f9b0@mail.gmail.com> <20090428193004.GA5465@ci0.org> <515c64960904282316k5f3e80cdu1c04a8dc3ab25883@mail.gmail.com> <20090429221236.GA28784@ci0.org> Date: Thu, 30 Apr 2009 10:51:30 +0530 Message-ID: <515c64960904292221v1e927ef2vb3ed2940f76d32cf@mail.gmail.com> From: Channa To: Olivier Houchard Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@freebsd.org Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 05:21:37 -0000 2009/4/30 Olivier Houchard : > On Wed, Apr 29, 2009 at 11:46:23AM +0530, Channa wrote: >> 2009/4/29 Olivier Houchard : >> > On Tue, Apr 28, 2009 at 07:32:14PM +0530, Channa wrote: >> >> Hi, >> >> >> >> Thank you very much for your response. >> >> I am looking forward for your fix. >> >> >> >> Thanks & Regards, >> >> Channa >> >> >> > >> > Hi, >> > >> > I just committed a fix to -CURRENT, as rev 191633. >> > It basically just checks if the length is 0, instead of len - 1 < 0. >> > >> > Thanks again, >> > >> > Olivier >> > >> > >> > >> >> Hi >> Thank you very much. I used your fix and tested again. >> When i tested as below : >> >> TEST 1 : >> =A0 ret =3D strncmp("a", "L", -1); =A0<----------------- ret is '0' >> > > I'm a bit confused here, when I test this I get 21, which is the intended > result. Are you sure you weren't still using the old strncmp() ? Hi, Yes i am using the latest version of strncmp.S in the CURRENT branch. Sorry there was a typo i tested strncmp as ret =3D strncmp("a","b",-1) <------ ret value is still '0' I am still getting the return value as zero, it should be -1. Thanks & Regards, Channa