=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/date.y,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/rcs/date.y 2006/04/29 04:42:47 1.2 --- src/usr.bin/rcs/date.y 2006/05/03 14:26:13 1.3 *************** *** 1,5 **** %{ ! /* $OpenBSD: date.y,v 1.2 2006/04/29 04:42:47 ray Exp $ */ /* ** Originally written by Steven M. Bellovin while --- 1,5 ---- %{ ! /* $OpenBSD: date.y,v 1.3 2006/05/03 14:26:13 ray Exp $ */ /* ** Originally written by Steven M. Bellovin while *************** *** 483,505 **** 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", s, yyInput[0]); else ! n = asprintf(&str, "%s: unexpected %s in date string", s, yyInput); - if (n == -1) - return (0); #if defined(TEST) printf("%s", str); #else warnx("%s", str); #endif ! free(str); return (0); } --- 483,502 ---- yyerror(const char *s) { 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); #if defined(TEST) printf("%s", str); #else warnx("%s", str); #endif ! xfree(str); return (0); }