summaryrefslogtreecommitdiffstats
path: root/monop
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2008-02-24 03:56:48 +0000
committerchristos <christos@NetBSD.org>2008-02-24 03:56:48 +0000
commite68df2be2d86409745cee75571833732bdd20c9a (patch)
tree702eaa3434801a1d6f30e0fa476d3f2c043f7f03 /monop
parent1df189f3144276793f0666e09654ef16a7f8ca13 (diff)
downloadbsdgames-darwin-e68df2be2d86409745cee75571833732bdd20c9a.tar.gz
bsdgames-darwin-e68df2be2d86409745cee75571833732bdd20c9a.tar.zst
bsdgames-darwin-e68df2be2d86409745cee75571833732bdd20c9a.zip
fix some lint
Diffstat (limited to 'monop')
-rw-r--r--monop/cards.c8
-rw-r--r--monop/execute.c8
-rw-r--r--monop/monop.c8
-rw-r--r--monop/print.c8
-rw-r--r--monop/prop.c9
5 files changed, 18 insertions, 23 deletions
diff --git a/monop/cards.c b/monop/cards.c
index 0494122b..6dbbd463 100644
--- a/monop/cards.c
+++ b/monop/cards.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cards.c,v 1.22 2008/02/24 02:43:18 dholland Exp $ */
+/* $NetBSD: cards.c,v 1.23 2008/02/24 03:56:48 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cards.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: cards.c,v 1.22 2008/02/24 02:43:18 dholland Exp $");
+__RCSID("$NetBSD: cards.c,v 1.23 2008/02/24 03:56:48 christos Exp $");
#endif
#endif /* not lint */
@@ -210,7 +210,7 @@ set_up(dp)
int r1, r2;
int i;
- dp->cards = calloc(dp->num_cards, sizeof(dp->cards[0]));
+ dp->cards = calloc((size_t)dp->num_cards, sizeof(dp->cards[0]));
if (dp->cards == NULL)
errx(1, "out of memory");
@@ -365,7 +365,7 @@ ret_card(plr)
int gojfpos, last_card;
int i;
DECK *dp;
- off_t temp;
+ int temp;
plr->num_gojf--;
if (CC_D.gojf_used)
diff --git a/monop/execute.c b/monop/execute.c
index e3231c21..9cace327 100644
--- a/monop/execute.c
+++ b/monop/execute.c
@@ -1,4 +1,4 @@
-/* $NetBSD: execute.c,v 1.18 2008/02/24 02:43:18 dholland Exp $ */
+/* $NetBSD: execute.c,v 1.19 2008/02/24 03:56:48 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)execute.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: execute.c,v 1.18 2008/02/24 02:43:18 dholland Exp $");
+__RCSID("$NetBSD: execute.c,v 1.19 2008/02/24 03:56:48 christos Exp $");
#endif
#endif /* not lint */
@@ -426,7 +426,7 @@ static enum {
RI_NONE,
RI_PLAYER,
RI_DECK,
- RI_SQUARE,
+ RI_SQUARE
} restore_item;
static int restore_itemnum;
@@ -525,7 +525,7 @@ restore_toplevel_attr(const char *attribute, char *txt)
printf("numplayers: multiple settings\n");
return -1;
}
- play = calloc(num_play, sizeof(play[0]));
+ play = calloc((size_t)num_play, sizeof(play[0]));
if (play == NULL) {
err(1, "calloc");
}
diff --git a/monop/monop.c b/monop/monop.c
index e50fdb7e..72b4b2b8 100644
--- a/monop/monop.c
+++ b/monop/monop.c
@@ -1,4 +1,4 @@
-/* $NetBSD: monop.c,v 1.21 2008/02/24 01:57:34 dholland Exp $ */
+/* $NetBSD: monop.c,v 1.22 2008/02/24 03:56:49 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)monop.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: monop.c,v 1.21 2008/02/24 01:57:34 dholland Exp $");
+__RCSID("$NetBSD: monop.c,v 1.22 2008/02/24 03:56:49 christos Exp $");
#endif
#endif /* not lint */
@@ -230,7 +230,7 @@ main(ac, av)
/* Revoke setgid privileges */
setgid(getgid());
- srandom(time(NULL));
+ srandom((unsigned long)time(NULL));
num_luck = sizeof lucky_mes / sizeof (char *);
init_decks();
init_monops();
@@ -278,7 +278,7 @@ blew_it:
else
break;
}
- cur_p = play = (PLAY *) calloc(num_play, sizeof (PLAY));
+ cur_p = play = calloc((size_t)num_play, sizeof (PLAY));
if (play == NULL)
err(1, NULL);
for (i = 0; i < num_play; i++) {
diff --git a/monop/print.c b/monop/print.c
index f6bbcf29..2b0cc42d 100644
--- a/monop/print.c
+++ b/monop/print.c
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.11 2008/02/24 01:57:34 dholland Exp $ */
+/* $NetBSD: print.c,v 1.12 2008/02/24 03:56:49 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: print.c,v 1.11 2008/02/24 01:57:34 dholland Exp $");
+__RCSID("$NetBSD: print.c,v 1.12 2008/02/24 03:56:49 christos Exp $");
#endif
#endif /* not lint */
@@ -82,9 +82,7 @@ where()
* This routine prints out an individual square
*/
void
-printsq(sqn, eoln)
- int sqn;
- bool eoln;
+printsq(int sqn, bool eoln)
{
int rnt;
PROP *pp;
diff --git a/monop/prop.c b/monop/prop.c
index a8950e29..fcf2cd65 100644
--- a/monop/prop.c
+++ b/monop/prop.c
@@ -1,4 +1,4 @@
-/* $NetBSD: prop.c,v 1.17 2008/02/24 01:57:34 dholland Exp $ */
+/* $NetBSD: prop.c,v 1.18 2008/02/24 03:56:49 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)prop.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: prop.c,v 1.17 2008/02/24 01:57:34 dholland Exp $");
+__RCSID("$NetBSD: prop.c,v 1.18 2008/02/24 03:56:49 christos Exp $");
#endif
#endif /* not lint */
@@ -97,10 +97,7 @@ add_list(plr, head, op_sqr)
* This routine deletes property from the list.
*/
void
-del_list(plr, head, op_sqr)
- int plr;
- OWN **head;
- short op_sqr;
+del_list(int plr, OWN **head, short op_sqr)
{
OWN *op, *last_op;