ngt_RandomStr(): Add implicit cast to "unsigned".
[ngircd-alex.git] / src / tool / tool.c
index 31c6fb41fb9272f5b4abd5e6713b12d359fb5387..df10918893348a4a1ef4205938e00db49eddb6b7 100644 (file)
@@ -147,7 +147,7 @@ ngt_RandomStr( char *String, const size_t len)
 
        struct timeval t;
        gettimeofday(&t, NULL);
-       srand(t.tv_usec * t.tv_sec);
+       srand((unsigned)(t.tv_usec * t.tv_sec));
 
        for (size_t i = 0; i < len; ++i) {
                String[i] = chars[rand() % (sizeof(chars) - 1)];