]> git.cworth.org Git - kub/commitdiff
Add unconditional return value to card_compare
authorCarl Worth <cworth@cworth.org>
Mon, 29 Jan 2007 14:22:09 +0000 (06:22 -0800)
committerCarl Worth <cworth@cworth.org>
Mon, 29 Jan 2007 14:22:09 +0000 (06:22 -0800)
This avoids a wanring from gcc about a function possibly not returning
a value.

kub.c

diff --git a/kub.c b/kub.c
index 702d833f51c362888a0c70bd419ec187952c16f5..b9636afc3e344d7273478c953880be27084cc1a2 100644 (file)
--- a/kub.c
+++ b/kub.c
@@ -81,8 +81,10 @@ static int card_compare(card_t *card_one, card_t *card_two)
        return -1;
     if (card_one->number == card_two->number)
        return 0;
-    if (card_one->number > card_two->number)
-       return 1;
+    /* At this point, we know that this must be true:
+     * if (card_one->number > card_two->number)
+     */
+    return 1;
 }
 
 static int card_group_is_run(card_group_t *card_group)