]> granicus.if.org Git - fortune-mod/commitdiff
silence signed comparison warning.
authorShlomi Fish <shlomif@shlomifish.org>
Wed, 16 Sep 2020 10:02:41 +0000 (13:02 +0300)
committerShlomi Fish <shlomif@shlomifish.org>
Wed, 16 Sep 2020 11:00:36 +0000 (14:00 +0300)
fortune-mod/util/randstr.c

index e64de6e90eb8088b6a87a99b67ca18c1c067374b..5d984466d1a89362519ffb75a2c61951a6e5f5dc 100644 (file)
@@ -124,7 +124,7 @@ static void getargs(char *av[])
 static void get_pos(STRFILE *fp)
 {
     pos = random() % fp->str_numstr;
-    if (++(pos) >= fp->str_numstr)
+    if (++(pos) >= (off_t)(fp->str_numstr))
         pos -= fp->str_numstr;
 }