Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jul 2013 12:35:39 +0000 (UTC)
From:      "Andrey A. Chernov" <ache@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r252698 - head/lib/libc/stdlib
Message-ID:  <201307041235.r64CZdKV093864@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307041235.r64CZdKV093864>