From owner-svn-src-all@FreeBSD.ORG Thu Jul 4 12:35:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0B1611000; Thu, 4 Jul 2013 12:35:40 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F1981124F; Thu, 4 Jul 2013 12:35:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r64CZdtu093865; Thu, 4 Jul 2013 12:35:39 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r64CZdKV093864; Thu, 4 Jul 2013 12:35:39 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201307041235.r64CZdKV093864@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 4 Jul 2013 12:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252698 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 04 Jul 2013 12:35:40 -0000 Author: ache Date: Thu Jul 4 12:35:39 2013 New Revision: 252698 URL: http://svnweb.freebsd.org/changeset/base/252698 Log: Style fix noted by bde@ Modified: head/lib/libc/stdlib/rand.c Modified: head/lib/libc/stdlib/rand.c ============================================================================== --- head/lib/libc/stdlib/rand.c Thu Jul 4 12:27:10 2013 (r252697) +++ head/lib/libc/stdlib/rand.c Thu Jul 4 12:35:39 2013 (r252698) @@ -83,12 +83,16 @@ do_rand(unsigned long *ctx) int rand_r(unsigned int *ctx) { - u_long val = (u_long) *ctx; -#ifndef USE_WEAK_SEEDING + u_long val; + int r; + +#ifdef USE_WEAK_SEEDING + val = *ctx; +#else /* Transform to [1, 0x7ffffffe] range. */ - val = (val % 0x7ffffffe) + 1; + val = (*ctx % 0x7ffffffe) + 1; #endif - int r = do_rand(&val); + r = do_rand(&val); #ifdef USE_WEAK_SEEDING *ctx = (unsigned int)val;