summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorConstantine A. Murenin <cnst@cvs.openbsd.org>2008-02-16 01:00:01 +0000
committerConstantine A. Murenin <cnst@cvs.openbsd.org>2008-02-16 01:00:01 +0000
commit6932997cb62080fd30dbb0e194cb615d381af7b3 (patch)
tree204a52c763f584cc01058073dbe1a4ddcc999586 /usr.bin
parentfa5c698e971a2b60a0ff93c93081450f22a3d23a (diff)
* yyInput doesn't seem to contain anything meaningful at the time when
yyerror() is called, so there's no point in printing it * unbreak `env CFLAGS='-DTEST' make date` ok joris@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/date.y12
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.bin/cvs/date.y b/usr.bin/cvs/date.y
index e2888e5b0a1..6e30f6e4f6e 100644
--- a/usr.bin/cvs/date.y
+++ b/usr.bin/cvs/date.y
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: date.y,v 1.17 2007/10/06 12:55:48 chl Exp $ */
+/* $OpenBSD: date.y,v 1.18 2008/02/16 01:00:00 cnst Exp $ */
/*
** Originally written by Steven M. Bellovin <smb@research.att.com> while
@@ -485,17 +485,13 @@ static TABLE const MilitaryTable[] = {
static int
yyerror(const char *s)
{
+#if !defined(TEST)
char *str;
- if (isspace(yyInput[0]) || !isprint(yyInput[0]))
- (void)xasprintf(&str,
- "%s: unexpected char 0x%02x in date string", s, yyInput[0]);
- else
- (void)xasprintf(&str, "%s: unexpected %s in date string",
- s, yyInput);
-
+ (void)xasprintf(&str, "parsing date string: %s", s);
cvs_log(LP_ERR, "%s", str);
xfree(str);
+#endif
return (0);
}