wmtetris: Include time.h and add argument to time().

This commit is contained in:
Doug Torrance 2017-02-20 19:15:58 -05:00 committed by Carlos R. Mafra
parent 74fe5b1bf0
commit 7d54e1c0b1

View file

@ -2,6 +2,7 @@
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/xpm.h> #include <X11/xpm.h>
@ -71,7 +72,7 @@ int main(int argc, char *argv[]) {
unsigned long delay = INITIAL_DELAY, start_time; unsigned long delay = INITIAL_DELAY, start_time;
XEvent event; XEvent event;
srand(time()); srand(time(NULL));
for (y = 0; y < BOARD_HEIGHT; y++) for (y = 0; y < BOARD_HEIGHT; y++)
for (x = 0; x < BOARD_WIDTH; x++) for (x = 0; x < BOARD_WIDTH; x++)