From 7dcf6715ffb3cc2f00f6327b896d16f173a1b082 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sat, 24 Feb 2018 06:45:44 +0100 Subject: New errno.h standard header Use standard errno codes. This change also adds strerror to string.h. --- test/test_sref_noref.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test_sref_noref.c b/test/test_sref_noref.c index 40f1d8fe..f5b1875e 100644 --- a/test/test_sref_noref.c +++ b/test/test_sref_noref.c @@ -32,12 +32,14 @@ * to occur. */ +#include #include #include +#include #include -#include #include +#include #include #include #include @@ -126,7 +128,7 @@ test_run(void *arg) threads = kmem_alloc(sizeof(*threads) * nr_threads); if (threads == NULL) { - panic("kmem_alloc: %s", error_str(ERROR_NOMEM)); + panic("kmem_alloc: %s", strerror(ENOMEM)); } for (i = 0; i < nr_threads; i++) { @@ -140,7 +142,7 @@ test_run(void *arg) obj = vm_kmem_alloc(sizeof(*obj)); if (obj == NULL) { - panic("vm_kmem_alloc: %s", error_str(ERROR_NOMEM)); + panic("vm_kmem_alloc: %s", strerror(ENOMEM)); } sref_counter_init(&obj->ref_counter, 1, NULL, test_obj_noref); -- cgit v1.2.3