Index: uspace/lib/c/generic/uuid.c
===================================================================
--- uspace/lib/c/generic/uuid.c	(revision ed3d605b4d0afbe0816d5d13d01a3bce3af81ebe)
+++ uspace/lib/c/generic/uuid.c	(revision d55abe8b0d0cb66d49007b6f0067770741057b07)
@@ -65,6 +65,6 @@
 
 	/* Version 4 UUID from random or pseudo-random numbers */
-	uuid->b[8] = (uuid->b[8] & ~0xc0) | 0x40;
-	uuid->b[6] = (uuid->b[6] & 0xf0) | 0x40;
+	uuid->b[6] = (uuid->b[6] & 0x4F) | 0x40;
+	uuid->b[8] = (uuid->b[8] & 0xBF) | 0xB0;
 
 	return EOK;
@@ -185,5 +185,5 @@
 	
 	const char *format = "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x";
-	if(uppercase)
+	if (uppercase)
 		format = "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X";
 
