=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/date.y,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- src/usr.bin/cvs/date.y 2006/04/29 04:42:46 1.12 +++ src/usr.bin/cvs/date.y 2006/05/03 14:26:13 1.13 @@ -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 while @@ -484,23 +484,20 @@ 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); }