summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/date.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/cvs/date.y')
-rw-r--r--usr.bin/cvs/date.y11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/cvs/date.y b/usr.bin/cvs/date.y
index 722df234635..a7893dff65d 100644
--- a/usr.bin/cvs/date.y
+++ b/usr.bin/cvs/date.y
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: date.y,v 1.12 2006/04/29 04:42:46 ray Exp $ */
+/* $OpenBSD: date.y,v 1.13 2006/05/03 14:26:13 ray Exp $ */
/*
** Originally written by Steven M. Bellovin <smb@research.att.com> while
@@ -484,23 +484,20 @@ static int
yyerror(const char *s)
{
char *str;
- int n;
if (isspace(yyInput[0]) || !isprint(yyInput[0]))
- n = asprintf(&str, "%s: unexpected char 0x%02x in date string",
+ (void)xasprintf(&str, "%s: unexpected char 0x%02x in date string",
s, yyInput[0]);
else
- n = asprintf(&str, "%s: unexpected %s in date string",
+ (void)xasprintf(&str, "%s: unexpected %s in date string",
s, yyInput);
- if (n == -1)
- return (0);
#if defined(TEST)
printf("%s", str);
#else
cvs_log(LP_ERR, "%s", str);
#endif
- free(str);
+ xfree(str);
return (0);
}