X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-hmap.c;h=6102be332171593688cdfa74471f44431356c220;hb=4b570f12766f3c4eeb527de69d8eedfd59c34b86;hp=c202eae14cd3e2314de77dfa5d49f7535c1f8d76;hpb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;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;