summaryrefslogtreecommitdiffstats
path: root/games/cribbage/score.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/cribbage/score.c')
-rw-r--r--games/cribbage/score.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/games/cribbage/score.c b/games/cribbage/score.c
index 239e26d..ecfed9a 100644
--- a/games/cribbage/score.c
+++ b/games/cribbage/score.c
@@ -115,7 +115,7 @@ scorehand(hand, starter, n, crb, do_explain)
CARD h[(CINHAND + 1)];
char buf[32];
- expl[0] = NULL; /* initialize explanation */
+ expl[0] = '\0'; /* initialize explanation */
score = 0;
flag = TRUE;
k = hand[0].suit;
@@ -131,7 +131,7 @@ scorehand(hand, starter, n, crb, do_explain)
}
if (flag && n >= CINHAND) {
- if (do_explain && expl[0] != NULL)
+ if (do_explain && expl[0] != '\0')
strcat(expl, ", ");
if (starter.suit == k) {
score += 5;
@@ -140,13 +140,13 @@ scorehand(hand, starter, n, crb, do_explain)
} else
if (!crb) {
score += 4;
- if (do_explain && expl[0] != NULL)
+ if (do_explain && expl[0] != '\0')
strcat(expl, ", Four-flush");
else
strcpy(expl, "Four-flush");
}
}
- if (do_explain && expl[0] != NULL)
+ if (do_explain && expl[0] != '\0')
strcat(expl, ", ");
h[n] = starter;
sorthand(h, n + 1); /* sort by rank */
OpenPOWER on IntegriCloud