MonetDB: Oct2014 - Don't care (here) that rand() is not cryptogr...

2014-08-14 Thread Sjoerd Mullender
Changeset: 0da5801f64c6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0da5801f64c6
Modified Files:
tools/merovingian/daemon/discoveryrunner.c
Branch: Oct2014
Log Message:

Don't care (here) that rand() is not cryptographically secure.


diffs (11 lines):

diff --git a/tools/merovingian/daemon/discoveryrunner.c 
b/tools/merovingian/daemon/discoveryrunner.c
--- a/tools/merovingian/daemon/discoveryrunner.c
+++ b/tools/merovingian/daemon/discoveryrunner.c
@@ -449,6 +449,7 @@ discoveryRunner(void *d)
Mfprintf(_mero_discout, "new neighbour %s (%s)\n", buf 
+ 5, host);
/* sleep a random amount of time to avoid an avalanche 
of
 * ANNC messages flooding the network */
+   /* coverity[dont_call] */
c = 1 + (int)(2500.0 * (rand() / (RAND_MAX + 1.0)));
sleep_ms(c);
/* force an announcement round by dropping the deadline 
*/
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Oct2014 - Don't care (here) that rand() is not cryptogr...

2014-08-14 Thread Sjoerd Mullender
Changeset: 18bbd540a10d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=18bbd540a10d
Modified Files:
monetdb5/modules/kernel/microbenchmark.c
monetdb5/modules/kernel/mmath.c
Branch: Oct2014
Log Message:

Don't care (here) that rand() is not cryptographically secure.


diffs (80 lines):

diff --git a/monetdb5/modules/kernel/microbenchmark.c 
b/monetdb5/modules/kernel/microbenchmark.c
--- a/monetdb5/modules/kernel/microbenchmark.c
+++ b/monetdb5/modules/kernel/microbenchmark.c
@@ -72,10 +72,12 @@ BATrandom(BAT **bn, oid *base, wrd *size
srand(seed);
if (*domain == int_nil) {
BATloop(b, p, q) {
+   /* coverity[dont_call] */
*(int *) Tloc(b, p) = rand();
}
} else {
BATloop(b, p, q) {
+   /* coverity[dont_call] */
*(int *) Tloc(b, p) = rand() % *domain;
}
}
@@ -139,6 +141,7 @@ BATuniform(BAT **bn, oid *base, wrd *siz
 
/* mix BUNs randomly */
for (r = i = 0; i < n; i++) {
+   /* coverity[dont_call] */
BUN idx = i + ((r += (BUN) rand()) % (n - i));
int val;
 
@@ -211,15 +214,18 @@ BATskewed(BAT **bn, oid *base, wrd *size
 
lastbun = firstbun + skewedSize;
for(p=firstbun; p https://www.monetdb.org/mailman/listinfo/checkin-list