-/* $OpenBSD: dc.c,v 1.19 2017/11/29 14:34:17 otto Exp $ */
+/* $OpenBSD: dc.c,v 1.20 2017/12/06 13:48:05 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
char *buf, *p;
struct stat st;
- if ((buf = strdup("")) == NULL)
- err(1, NULL);
+ buf = bstrdup("");
/* accept and ignore a single dash to be 4.4BSD dc(1) compatible */
optind = 1;
optreset = 1;
-/* $OpenBSD: stack.c,v 1.14 2016/03/27 15:55:13 otto Exp $ */
+/* $OpenBSD: stack.c,v 1.15 2017/12/06 13:48:05 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
copy->u.num = dup_number(a->u.num);
break;
case BCODE_STRING:
- copy->u.string = strdup(a->u.string);
- if (copy->u.string == NULL)
- err(1, NULL);
+ copy->u.string = bstrdup(a->u.string);
break;
}