2744 libuuid can't tell when mapping fails
authorRichard Lowe <richlowe@richlowe.net>
Wed, 16 May 2012 04:25:04 +0000
changeset 13697 e2d77ee5f4aa
parent 13696 7b5944437191
child 13698 37bcb30d41d5
2744 libuuid can't tell when mapping fails Reviewed by: Joshua M. Clulow <[email protected]> Approved by: Robert Mustacchi <[email protected]>
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