[PATCH 4/7] wmtetris: Include time.h and add argument to time().

Doug Torrance <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
---
 wmtetris/wmtetris/wmtetris.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.