From owner-svn-src-stable@FreeBSD.ORG Mon Mar 19 01:58:44 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D13EA1065677 for ; Mon, 19 Mar 2012 01:58:44 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC028FC1C for ; Mon, 19 Mar 2012 01:58:43 +0000 (UTC) Received: by lagv3 with SMTP id v3so6124295lag.13 for ; Sun, 18 Mar 2012 18:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=HHQlaUytgYY1OLpEvtP7+RCBrkZA4UKx9QC5nkvGkb0=; b=gijIJSO+uhvbSE6azwNrYvcyYeKr+co/qL8DRkBmMYwHyK4ulSLidZq8Q9aTD0NrKu dmafGGQG/mtdrsDCDvk5kbSZCmwITE6nC4jayxmLkbecwavLoxHb8tVbHWcWM9aVSaEl MTkzWexQWZkexxEUHwLKsNXO/LldyellIRinc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=HHQlaUytgYY1OLpEvtP7+RCBrkZA4UKx9QC5nkvGkb0=; b=S+NbSTTFwJhJXvtc7A/IN3KyIoygdNm0i755H/n3S1dBEaNuS13kIo/hBGOuqpirjg a/axDHJKzfBA8/sPBIQviUNJ9lTChNRo22NOF/3c9f23qly94IY6TQdcki3Jkx6lSEy3 d+GI02AATNzd/vhNqYXyEsbQH0Xq7TYuRtK5InX1gMCU0s42EoWL1bVq49dnD/xGHEVu J2VbnNG15U7ptCSit5qLKZJfK9mR+Xr7g6C+nmGx/T0LooRNN5iXrzJc0NGrNfRXcnTG 9kUx8fZ4lV9ZJ/yLJ2Yb6C+0KacFQu9GyQ5w2rdjLEYol+7m9YGGpFdoYnunNqCDA1gu bZDg== Received: by 10.112.24.161 with SMTP id v1mr4174285lbf.12.1332122322899; Sun, 18 Mar 2012 18:58:42 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.106.105 with HTTP; Sun, 18 Mar 2012 18:58:12 -0700 (PDT) In-Reply-To: <20120319015203.GB13456@DataIX.net> References: <201203190127.q2J1RtgB044557@svn.freebsd.org> <20120319015203.GB13456@DataIX.net> From: Eitan Adler Date: Sun, 18 Mar 2012 21:58:12 -0400 X-Google-Sender-Auth: cg-UeLuRKxLBoJasBzs0K9hRZEs Message-ID: To: Jason Hellenthal Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnu7zwuiC9k5t8owe2PkEmn6T05aXA0BarQQqBH65l4uCm2Rgb8z0KB5JrBXdCm6rJ7IX/E Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r233147 - stable/8/lib/libc/string X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2012 01:58:44 -0000 On Sun, Mar 18, 2012 at 9:52 PM, Jason Hellenthal wrote: > > > On Mon, Mar 19, 2012 at 01:27:55AM +0000, Eitan Adler wrote: >> Author: eadler >> Date: Mon Mar 19 01:27:55 2012 >> New Revision: 233147 >> URL: http://svn.freebsd.org/changeset/base/233147 >> >> Log: >> =C2=A0 MFC r232503: >> =C2=A0 =C2=A0 =C2=A0 POSIX mandates that swab do nothing when len < 0 >> >> =C2=A0 PR: =C2=A0 =C2=A0 =C2=A0 =C2=A0 140690 >> =C2=A0 Approved by: =C2=A0 =C2=A0 =C2=A0 =C2=A0cperciva >> >> Modified: stable/8/lib/libc/string/swab.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- stable/8/lib/libc/string/swab.c =C2=A0 Mon Mar 19 01:27:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233146) >> +++ stable/8/lib/libc/string/swab.c =C2=A0 Mon Mar 19 01:27:55 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233147) >> @@ -45,6 +45,8 @@ swab(const void * __restrict from, void >> =C2=A0 =C2=A0 =C2=A0 int n; >> =C2=A0 =C2=A0 =C2=A0 char *fp, *tp; >> >> + =C2=A0 =C2=A0 if (len <=3D 0) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return; > > Does this not test to see if it is also equal to 0(zero) ? > > If I understand the above statement "POSIX mandates that swab do nothing > when len < 0" then the above code should be exactly that ... and not > testing whether it is equal to zero... If the code doesn't check for len <=3D 0 then it will do something. --=20 Eitan Adler Source & Ports committer X11, Bugbusting teams