summaryrefslogtreecommitdiffstats
path: root/fortune/strfile
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>1999-12-07 23:07:39 +0000
committerjsm <jsm@NetBSD.org>1999-12-07 23:07:39 +0000
commit32c2e42e42d0fb69bc512189906dce8e1757656e (patch)
tree485c3210dd1a5e5f2cca13aa6d41d01e2a39867e /fortune/strfile
parentf4b40701897248744c931eb09d28023185fc437d (diff)
downloadbsdgames-darwin-32c2e42e42d0fb69bc512189906dce8e1757656e.tar.gz
bsdgames-darwin-32c2e42e42d0fb69bc512189906dce8e1757656e.tar.zst
bsdgames-darwin-32c2e42e42d0fb69bc512189906dce8e1757656e.zip
Fix a gcc -W warning (empty body in an else-statement).
Diffstat (limited to 'fortune/strfile')
-rw-r--r--fortune/strfile/strfile.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/fortune/strfile/strfile.c b/fortune/strfile/strfile.c
index f8ff4a2f..a548be55 100644
--- a/fortune/strfile/strfile.c
+++ b/fortune/strfile/strfile.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strfile.c,v 1.14 1999/09/18 19:38:50 jsm Exp $ */
+/* $NetBSD: strfile.c,v 1.15 1999/12/07 23:07:39 jsm Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: strfile.c,v 1.14 1999/09/18 19:38:50 jsm Exp $");
+__RCSID("$NetBSD: strfile.c,v 1.15 1999/12/07 23:07:39 jsm Exp $");
#endif
#endif /* not lint */
@@ -94,19 +94,14 @@ __RCSID("$NetBSD: strfile.c,v 1.14 1999/09/18 19:38:50 jsm Exp $");
# define STORING_PTRS (Oflag || Rflag)
# define CHUNKSIZE 512
-#ifdef lint
-# define ALWAYS atoi("1")
-#else
-# define ALWAYS 1
-#endif
-# define ALLOC(ptr,sz) if (ALWAYS) { \
+# define ALLOC(ptr,sz) do { \
if (ptr == NULL) \
ptr = malloc((unsigned int) (CHUNKSIZE * sizeof *ptr)); \
else if (((sz) + 1) % CHUNKSIZE == 0) \
ptr = realloc((void *) ptr, ((unsigned int) ((sz) + CHUNKSIZE) * sizeof *ptr)); \
if (ptr == NULL) \
errx(1, "out of space"); \
- } else
+ } while (0)
#ifdef NO_VOID
# define void char