mirror of
https://gittea.dev/nova/th.git
synced 2025-10-22 02:40:15 -04:00
removal of rand() in sort_rand
This commit is contained in:
8
main.c
8
main.c
@@ -21,7 +21,7 @@ unsigned int settings;
|
||||
unsigned int file_modifiers;
|
||||
unsigned int status = (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY);
|
||||
char *start_path;
|
||||
time_t seed;
|
||||
time_t *seed;
|
||||
|
||||
WINDOW *win_t;
|
||||
WINDOW *win_b;
|
||||
@@ -102,7 +102,6 @@ int main(){
|
||||
if (dt - t >= SETTINGS_RELOAD_DIR_DELTA) {
|
||||
time(&t);
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY);
|
||||
srand(seed);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -209,6 +208,9 @@ void init() {
|
||||
char *start_path = getcwd(NULL, 0);
|
||||
setenv("START_PATH", start_path, 0);
|
||||
free(start_path);
|
||||
seed = time(NULL);
|
||||
|
||||
seed = malloc(sizeof(time_t));
|
||||
*seed = time(NULL);
|
||||
|
||||
printf("%ld", (time_t)&seed);
|
||||
}
|
||||
|
Reference in New Issue
Block a user