# HG changeset patch # User Richard Lowe # Date 1337142304 0 # Node ID e2d77ee5f4aa4c58b4011c21aefc9511f5596f25 # Parent 7b5944437191120b8709fff9e684006ab6efd06c 2744 libuuid can't tell when mapping fails Reviewed by: Joshua M. Clulow Approved by: Robert Mustacchi diff -r 7b5944437191 -r e2d77ee5f4aa usr/src/lib/libuuid/common/uuid.c --- 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