* all mallocs now use xmalloc (and so are OOM error safe), and
the common error handling saves a few bytes. Thanks to
Bob Tinsley <bob@earthrise.demon.co.uk> for the patch.
-Erik
diff --git a/tr.c b/tr.c
index 8ac09e6..3bfa480 100644
--- a/tr.c
+++ b/tr.c
@@ -44,7 +44,7 @@
#endif
static const char rcsid[] =
- "$Id: tr.c,v 1.1 2000/03/05 08:07:00 erik Exp $";
+ "$Id: tr.c,v 1.2 2000/03/21 22:32:57 erik Exp $";
#endif /* not lint */
#endif /* #if 0 */
@@ -433,8 +433,7 @@
"unknown class %s",
s->str);
- if ((cp->set = p = malloc((NCHARS + 1) * sizeof(int))) == NULL)
- errx(1, "malloc");
+ cp->set = p = xmalloc((NCHARS + 1) * sizeof(int));
bzero(p, (NCHARS + 1) * sizeof(int));
for (cnt = 0, func = cp->func; cnt < NCHARS; ++cnt)