From owner-cvs-all Sat Sep 5 06:56:22 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA25084 for cvs-all-outgoing; Sat, 5 Sep 1998 06:56:22 -0700 (PDT) (envelope-from owner-cvs-all) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA25026; Sat, 5 Sep 1998 06:55:39 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.9.1/8.8.5) with SMTP id NAA12471; Sat, 5 Sep 1998 13:55:01 GMT Date: Sat, 5 Sep 1998 14:55:01 +0100 (BST) From: Doug Rabson To: "Andrey A. Chernov" cc: John Birrell , cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libc/gen sleep.c In-Reply-To: <19980905163746.A21849@nagual.pp.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sat, 5 Sep 1998, Andrey A. Chernov wrote: > On Sat, Sep 05, 1998 at 01:01:27AM -0700, John Birrell wrote: > > jb 1998/09/05 01:01:27 PDT > > > > Modified files: > > lib/libc/gen sleep.c > > Log: > > Use INT_MAX instead of LONG_MAX since the variable being compared > > is an int, not a long. > > > Please back it out, the test covers the case when > sizeof(unsigned) == sizeof(long) and prevents to overflow signed long with > unsigned value. Something needs to change here. LONG_MAX is too big to compare against an int and generates a warning on the alpha. Maybe compare against UINT_MAX? -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039