X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-hmap.c;h=6102be332171593688cdfa74471f44431356c220;hb=bbb8dee92d639331e8bd81823638267dcc895396;hp=c202eae14cd3e2314de77dfa5d49f7535c1f8d76;hpb=e368cad8ecf6dbf272b2a3775b2e3e5e2dc6a5cf;p=sliver-openvswitch.git diff --git a/tests/test-hmap.c b/tests/test-hmap.c index c202eae14..6102be332 100644 --- a/tests/test-hmap.c +++ b/tests/test-hmap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ #include "hmap.h" #include #include "hash.h" +#include "random.h" #include "util.h" #undef NDEBUG @@ -108,7 +109,7 @@ static void shuffle(int *p, size_t n) { for (; n > 1; n--, p++) { - int *q = &p[rand() % n]; + int *q = &p[random_range(n)]; int tmp = *p; *p = *q; *q = tmp;