From 0b99919c55d09aa91d1c3c2291072d19e14fa8ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Wed, 20 Oct 2010 22:01:36 +0200 Subject: [PATCH] shm: Use the macro for the last error too --- sys/shm/shmpipe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/shm/shmpipe.c b/sys/shm/shmpipe.c index c1c9d68..436b8d2 100644 --- a/sys/shm/shmpipe.c +++ b/sys/shm/shmpipe.c @@ -232,10 +232,8 @@ sp_writer_create (const char *path, size_t size, mode_t perms) self->perms = perms; - if (!self->shm_area) { - sp_close (self); - return NULL; - } + if (!self->shm_area) + RETURN_ERROR ("Could not open shm area (%d): %s", errno, strerror (errno)); return self; } -- 2.7.4