Mercurial > hg > freeDiameter
comparison extensions/rt_randomize/rt_randomize.c @ 1284:38e4a7c318ac
Fix a number of compilation warnings
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Sun, 04 Jan 2015 00:55:57 +0800 |
parents | 2a7b32176d2e |
children | a2e760b28cb6 |
comparison
equal
deleted
inserted
replaced
1283:f09f16f432e6 | 1284:38e4a7c318ac |
---|---|
36 * randomly increase the score of one of them. | 36 * randomly increase the score of one of them. |
37 */ | 37 */ |
38 | 38 |
39 #include <stdlib.h> | 39 #include <stdlib.h> |
40 | 40 |
41 static int seed; | 41 static unsigned int seed; |
42 | 42 |
43 static int rt_randomizing(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) | 43 static int rt_randomizing(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) |
44 { | 44 { |
45 struct fd_list *lic; | 45 struct fd_list *lic; |
46 struct msg * msg = *pmsg; | 46 struct msg * msg = *pmsg; |
93 /* entry point */ | 93 /* entry point */ |
94 static int rt_randomize_entry(char * conffile) | 94 static int rt_randomize_entry(char * conffile) |
95 { | 95 { |
96 /* Register the callback */ | 96 /* Register the callback */ |
97 CHECK_FCT(fd_rt_out_register(rt_randomizing, NULL, 4, &rt_randomizing_hdl)); | 97 CHECK_FCT(fd_rt_out_register(rt_randomizing, NULL, 4, &rt_randomizing_hdl)); |
98 seed = (int)time(NULL); | 98 seed = (unsigned int)time(NULL); |
99 TRACE_DEBUG(INFO, "Extension 'Randomizing' initialized"); | 99 TRACE_DEBUG(INFO, "Extension 'Randomizing' initialized"); |
100 return 0; | 100 return 0; |
101 } | 101 } |
102 | 102 |
103 /* Unload */ | 103 /* Unload */ |