summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2012-05-16 04:25:04 +0000
committerRichard Lowe <richlowe@richlowe.net>2012-05-16 04:25:04 +0000
commitad2de4358b2074634b0f2355c34b0986da0e95f9 (patch)
tree566c9efe8eca4b433657e0833569ad0b119e6f59 /usr/src
parent0fa55b7a0c713a7106c9fa74bbbae3d0760ac8a1 (diff)
downloadillumos-gate-ad2de4358b2074634b0f2355c34b0986da0e95f9.tar.gz
2744 libuuid can't tell when mapping fails
Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libuuid/common/uuid.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr/src/lib/libuuid/common/uuid.c b/usr/src/lib/libuuid/common/uuid.c
index 8c5171e2f3..92770e0b84 100644
--- a/usr/src/lib/libuuid/common/uuid.c
+++ b/usr/src/lib/libuuid/common/uuid.c
@@ -71,7 +71,6 @@ shared_buffer_t *data;
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 @@ uuid_create(struct uuid *uuid)
* 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