From owner-freebsd-hackers Tue Feb 18 18:24:18 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3B1437B401 for ; Tue, 18 Feb 2003 18:24:17 -0800 (PST) Received: from mail.deltanet.com (mail.deltanet.com [216.237.144.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39C2C43F75 for ; Tue, 18 Feb 2003 18:24:16 -0800 (PST) (envelope-from pherman@frenchfries.net) Received: from mammoth.eat.frenchfries.net (da001d0015.lax-ca.osd.concentric.net [66.239.48.15]) by mail.deltanet.com (8.11.6/8.11.6) with ESMTP id h1J2NUQ30930 for ; Tue, 18 Feb 2003 18:24:00 -0800 Received: by mammoth.eat.frenchfries.net (Postfix, from userid 1000) id A850D4B4F; Tue, 18 Feb 2003 18:22:37 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mammoth.eat.frenchfries.net (Postfix) with ESMTP id A5AAB4B4E; Tue, 18 Feb 2003 18:22:37 -0800 (PST) Date: Tue, 18 Feb 2003 18:22:37 -0800 (PST) From: Paul Herman X-X-Sender: pherman@mammoth.eat.frenchfries.net To: Anthony Schneider Cc: FreeBSD Hackers Subject: Re: arc4random() range In-Reply-To: <20030219013247.GA10910@x-anthony.com> Message-ID: <20030218180736.L240-100000@mammoth.eat.frenchfries.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 18 Feb 2003, Anthony Schneider wrote: > an issue of arc4random return u_int32_t and rand* > returning int (ie unsigned vs signed)? Nope, casting arc4random() to int or casting random() to unsigned int won't solve the problem. The problem still is that arc4random()'s range is twice that of it's friends'. -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message