Mercurial > illumos > illumos-gate
changeset 13697:e2d77ee5f4aa
2744 libuuid can't tell when mapping fails
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Approved by: Robert Mustacchi <rm@joyent.com>
author | Richard Lowe <richlowe@richlowe.net> |
---|---|
date | Wed, 16 May 2012 04:25:04 +0000 |
parents | 7b5944437191 |
children | 37bcb30d41d5 |
files | usr/src/lib/libuuid/common/uuid.c |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libuuid/common/uuid.c Wed May 16 09:00:21 2012 -0700 +++ b/usr/src/lib/libuuid/common/uuid.c Wed May 16 04:25:04 2012 +0000 @@ -71,7 +71,6 @@ static uuid_node_t node_id_cache; static int node_init; -static int buffer_init; static int file_type; static int fd; @@ -123,11 +122,8 @@ * file_type tells us whether we had access to the state file or * created a temporary one. */ - buffer_init = map_state(); - - if (!buffer_init) { - return (buffer_init); - } + if (map_state() == -1) + return (-1); /* * Acquire the lock