summaryrefslogtreecommitdiffstats
path: root/larn/fortune.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2008-01-28 05:38:53 +0000
committerdholland <dholland@NetBSD.org>2008-01-28 05:38:53 +0000
commite30950ccc7c7c31c69f1d31c16b0212bbf168ceb (patch)
tree2db2120a69bedac57d95d284e878f9975b6a17ed /larn/fortune.c
parent9005237a04850abb22afe099ef07649b4115ed3f (diff)
downloadbsdgames-darwin-e30950ccc7c7c31c69f1d31c16b0212bbf168ceb.tar.gz
bsdgames-darwin-e30950ccc7c7c31c69f1d31c16b0212bbf168ceb.tar.zst
bsdgames-darwin-e30950ccc7c7c31c69f1d31c16b0212bbf168ceb.zip
Larn now builds with WARNS=4.
Diffstat (limited to 'larn/fortune.c')
-rw-r--r--larn/fortune.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/larn/fortune.c b/larn/fortune.c
index 0140c05b..84cca6bd 100644
--- a/larn/fortune.c
+++ b/larn/fortune.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fortune.c,v 1.5 2003/08/07 09:37:23 agc Exp $ */
+/* $NetBSD: fortune.c,v 1.6 2008/01/28 05:38:53 dholland Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)fortune.c 5.5 (Berkeley) 6/10/91";
#else
-__RCSID("$NetBSD: fortune.c,v 1.5 2003/08/07 09:37:23 agc Exp $");
+__RCSID("$NetBSD: fortune.c,v 1.6 2008/01/28 05:38:53 dholland Exp $");
#endif
#endif /* not lint */
@@ -48,7 +48,7 @@ __RCSID("$NetBSD: fortune.c,v 1.5 2003/08/07 09:37:23 agc Exp $");
* function to return a random fortune from the fortune file
*/
-char *flines[] = {
+const char *flines[] = {
"gem value = gem * 2 ^ perfection",
"sitting down can have unexpected results",
"don't pry into the affairs of others",
@@ -87,8 +87,8 @@ char *flines[] = {
#define NFORTUNES 34
-char *
-fortune()
+const char *
+fortune(void)
{
return (flines[random() % NFORTUNES]);
}