summaryrefslogtreecommitdiffstats
path: root/sail/sync.c
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2006-05-18 18:42:59 +0000
committermrg <mrg@NetBSD.org>2006-05-18 18:42:59 +0000
commit1d55feb5540573e2b97700e9bb927a9beef93d4b (patch)
tree20fc758bce4a749ecfec4b5adda5ef11c8996643 /sail/sync.c
parentbed03016527f1e6cf4b292d2d03d52911c2cbc8c (diff)
downloadbsdgames-darwin-1d55feb5540573e2b97700e9bb927a9beef93d4b.tar.gz
bsdgames-darwin-1d55feb5540573e2b97700e9bb927a9beef93d4b.tar.zst
bsdgames-darwin-1d55feb5540573e2b97700e9bb927a9beef93d4b.zip
don't try to switch a char and have a case of EOF - use an int.
Diffstat (limited to 'sail/sync.c')
-rw-r--r--sail/sync.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sail/sync.c b/sail/sync.c
index 7fe76604..757aa4d9 100644
--- a/sail/sync.c
+++ b/sail/sync.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sync.c,v 1.23 2004/09/07 13:20:39 jrf Exp $ */
+/* $NetBSD: sync.c,v 1.24 2006/05/18 18:42:59 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)sync.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: sync.c,v 1.23 2004/09/07 13:20:39 jrf Exp $");
+__RCSID("$NetBSD: sync.c,v 1.24 2006/05/18 18:42:59 mrg Exp $");
#endif
#endif /* not lint */
@@ -251,9 +251,13 @@ Sync(void)
if (isstr != 0 && isstr != 1)
goto bad;
if (isstr) {
+ int c;
char *p;
+
for (p = buf;;) {
- switch (*p++ = getc(sync_fp)) {
+ c = getc(sync_fp);
+ *p++ = (char)c;
+ switch (c) {
case '\n':
p--;
case EOF: