Fix issue detected by static analysis tool 76/297176/1 accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20231005.095139 accepted/tizen/unified/20230814.121019 tizen_8.0_m2_release
authorInhong Han <inhong1.han@samsung.com>
Fri, 11 Aug 2023 06:35:57 +0000 (15:35 +0900)
committerInhong Han <inhong1.han@samsung.com>
Fri, 11 Aug 2023 06:35:57 +0000 (15:35 +0900)
Change-Id: I67e4520bcac592600ad83e6060e2499620d20359

bench/key-proc.c
test/atom.c

index 1d29243..13f1b55 100644 (file)
@@ -39,6 +39,8 @@ bench_key_proc(struct xkb_state *state)
     xkb_keysym_t keysym;
     int i;
 
+    srand((unsigned) time(NULL));
+
     for (i = 0; i < BENCHMARK_ITERATIONS; i++) {
         keycode = (rand() % (255 - 9)) + 9;
         if (keys[keycode]) {
index a2f7541..d42d451 100644 (file)
@@ -45,6 +45,8 @@ random_string(char **str_out, size_t *len_out)
     size_t len;
     char *str;
 
+    srand((unsigned) time(NULL));
+
     len = rand() % 15;
     str = malloc(len + 1);
     assert(str);