Hi!

pledge right at the top to rpath to read the cardfiles at the beginning,
and wpath cpath to write the save game at any time of the game. Also a KNF.

Index: monop.c
===================================================================
RCS file: /cvs/src/games/monop/monop.c,v
retrieving revision 1.13
diff -u -p -u -r1.13 monop.c
--- monop.c     22 Aug 2015 14:47:41 -0000      1.13
+++ monop.c     20 Nov 2015 19:02:05 -0000
@@ -48,8 +48,12 @@ main(ac, av)
        char    *av[];
 {
        num_luck = sizeof lucky_mes / sizeof (char *);
+
+       if (pledge("stdio rpath wpath cpath", NULL) == -1)
+               err(1, "pledge");
+
        init_decks();
-               init_monops();
+       init_monops();
        if (ac > 1) {
                if (!rest_f(av[1]))
                        restore();

Reply via email to