From 275e864bc1a0cec8cc06cc59df35fb8d7718f482 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 11 Aug 2014 15:21:44 +0000 Subject: [PATCH] Give static variable function scope. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14260 --- coregrind/m_libcbase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coregrind/m_libcbase.c b/coregrind/m_libcbase.c index abacd712d6..0159510bec 100644 --- a/coregrind/m_libcbase.c +++ b/coregrind/m_libcbase.c @@ -935,10 +935,10 @@ void VG_(ssort)( void* base, SizeT nmemb, SizeT size, // is NULL, it uses its own seed, which starts at zero. If pSeed is // non-NULL, it uses and updates whatever pSeed points at. -static UInt seed = 0; - UInt VG_(random)( /*MOD*/UInt* pSeed ) { + static UInt seed = 0; + if (pSeed == NULL) pSeed = &seed; -- 2.47.3