X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-hmap.c;h=6102be332171593688cdfa74471f44431356c220;hb=bbb8dee92d639331e8bd81823638267dcc895396;hp=be6bcf4a784c9ee105adef847f08dde83922c8a3;hpb=4e8e4213a815a30216e855a805a8bcd5b8c5a886;p=sliver-openvswitch.git diff --git a/tests/test-hmap.c b/tests/test-hmap.c index be6bcf4a7..6102be332 100644 --- a/tests/test-hmap.c +++ b/tests/test-hmap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira Networks. + * 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;