summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2017-12-12 19:08:57 +0000
committerotto <otto@openbsd.org>2017-12-12 19:08:57 +0000
commit4ac087679afd910ee4d05af5e53c800f1bb46383 (patch)
treef67b79f722ba42e5d6aa2ce7211f34fba98fd82b
parentMinor cleanup from kshe (diff)
downloadwireguard-openbsd-4ac087679afd910ee4d05af5e53c800f1bb46383.tar.xz
wireguard-openbsd-4ac087679afd910ee4d05af5e53c800f1bb46383.zip
Use bn_checkp() always; from kshe
-rw-r--r--usr.bin/dc/mem.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/dc/mem.c b/usr.bin/dc/mem.c
index 7359d48e7ae..db0abfe73e9 100644
--- a/usr.bin/dc/mem.c
+++ b/usr.bin/dc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.8 2017/12/07 06:34:05 otto Exp $ */
+/* $OpenBSD: mem.c,v 1.9 2017/12/12 19:08:57 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -32,8 +32,7 @@ new_number(void)
n = bmalloc(sizeof(*n));
n->scale = 0;
n->number = BN_new();
- if (n->number == NULL)
- err(1, NULL);
+ bn_checkp(n->number);
return n;
}