2744 libuuid can't tell when mapping fails
Reviewed by: Joshua M. Clulow <
[email protected]>
Approved by: Robert Mustacchi <
[email protected]>
--- 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