Index: uspace/lib/softfloat/generic/conversion.c
===================================================================
--- uspace/lib/softfloat/generic/conversion.c	(revision 00acd66d3981789b3f8b04cdd854d29343dd9aa0)
+++ uspace/lib/softfloat/generic/conversion.c	(revision cefb126edea34b0dd89c1d23a3945eba732448c8)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup softfloat	
+/** @addtogroup softfloat
  * @{
  */
@@ -45,7 +45,7 @@
 	result.parts.sign = a.parts.sign;
 	result.parts.fraction = a.parts.fraction;
-	result.parts.fraction <<= (FLOAT64_FRACTION_SIZE - FLOAT32_FRACTION_SIZE );
-	
-	if ((isFloat32Infinity(a))||(isFloat32NaN(a))) {
+	result.parts.fraction <<= (FLOAT64_FRACTION_SIZE - FLOAT32_FRACTION_SIZE);
+	
+	if ((isFloat32Infinity(a)) || (isFloat32NaN(a))) {
 		result.parts.exp = 0x7FF;
 		/* TODO; check if its correct for SigNaNs*/
@@ -53,5 +53,5 @@
 	};
 	
-	result.parts.exp = a.parts.exp + ( (int)FLOAT64_BIAS - FLOAT32_BIAS );
+	result.parts.exp = a.parts.exp + ((int) FLOAT64_BIAS - FLOAT32_BIAS);
 	if (a.parts.exp == 0) {
 		/* normalize denormalized numbers */
@@ -181,16 +181,15 @@
 uint32_t float32_to_uint32(float32 a)
 {
-	if (isFloat32NaN(a)) {
-		return MAX_UINT32;
-	}
-	
-	if (isFloat32Infinity(a) || (a.parts.exp >= (32 + FLOAT32_BIAS)))  {
-		if (a.parts.sign) {
-			return MIN_UINT32;
-		}
-		return MAX_UINT32;
-	}
-	
-	return _float32_to_uint32_helper(a);	
+	if (isFloat32NaN(a))
+		return UINT32_MAX;
+	
+	if (isFloat32Infinity(a) || (a.parts.exp >= (32 + FLOAT32_BIAS))) {
+		if (a.parts.sign)
+			return UINT32_MIN;
+		
+		return UINT32_MAX;
+	}
+	
+	return _float32_to_uint32_helper(a);
 }
 
@@ -201,16 +200,16 @@
 int32_t float32_to_int32(float32 a)
 {
-	if (isFloat32NaN(a)) {
-		return MAX_INT32;
-	}
-	
-	if (isFloat32Infinity(a) || (a.parts.exp >= (32 + FLOAT32_BIAS)))  {
-		if (a.parts.sign) {
-			return MIN_INT32;
-		}
-		return MAX_INT32;
-	}
+	if (isFloat32NaN(a))
+		return INT32_MAX;
+	
+	if (isFloat32Infinity(a) || (a.parts.exp >= (32 + FLOAT32_BIAS))) {
+		if (a.parts.sign)
+			return INT32_MIN;
+		
+		return INT32_MAX;
+	}
+	
 	return _float32_to_uint32_helper(a);
-}	
+}
 
 
@@ -249,16 +248,16 @@
 uint64_t float64_to_uint64(float64 a)
 {
-	if (isFloat64NaN(a)) {
-		return MAX_UINT64;
-	}
-	
-	if (isFloat64Infinity(a) || (a.parts.exp >= (64 + FLOAT64_BIAS)))  {
-		if (a.parts.sign) {
-			return MIN_UINT64;
-		}
-		return MAX_UINT64;
-	}
-	
-	return _float64_to_uint64_helper(a);	
+	if (isFloat64NaN(a))
+		return UINT64_MAX;
+	
+	
+	if (isFloat64Infinity(a) || (a.parts.exp >= (64 + FLOAT64_BIAS))) {
+		if (a.parts.sign)
+			return UINT64_MIN;
+		
+		return UINT64_MAX;
+	}
+	
+	return _float64_to_uint64_helper(a);
 }
 
@@ -269,16 +268,17 @@
 int64_t float64_to_int64(float64 a)
 {
-	if (isFloat64NaN(a)) {
-		return MAX_INT64;
-	}
-	
-	if (isFloat64Infinity(a) || (a.parts.exp >= (64 + FLOAT64_BIAS)))  {
-		if (a.parts.sign) {
-			return MIN_INT64;
-		}
-		return MAX_INT64;
-	}
+	if (isFloat64NaN(a))
+		return INT64_MAX;
+	
+	
+	if (isFloat64Infinity(a) || (a.parts.exp >= (64 + FLOAT64_BIAS))) {
+		if (a.parts.sign)
+			return INT64_MIN;
+		
+		return INT64_MAX;
+	}
+	
 	return _float64_to_uint64_helper(a);
-}	
+}
 
 
@@ -320,16 +320,16 @@
 uint64_t float32_to_uint64(float32 a)
 {
-	if (isFloat32NaN(a)) {
-		return MAX_UINT64;
-	}
-	
-	if (isFloat32Infinity(a) || (a.parts.exp >= (64 + FLOAT32_BIAS)))  {
-		if (a.parts.sign) {
-			return MIN_UINT64;
-		}
-		return MAX_UINT64;
-	}
-	
-	return _float32_to_uint64_helper(a);	
+	if (isFloat32NaN(a))
+		return UINT64_MAX;
+	
+	
+	if (isFloat32Infinity(a) || (a.parts.exp >= (64 + FLOAT32_BIAS))) {
+		if (a.parts.sign)
+			return UINT64_MIN;
+		
+		return UINT64_MAX;
+	}
+	
+	return _float32_to_uint64_helper(a);
 }
 
@@ -340,16 +340,16 @@
 int64_t float32_to_int64(float32 a)
 {
-	if (isFloat32NaN(a)) {
-		return MAX_INT64;
-	}
-	
-	if (isFloat32Infinity(a) || (a.parts.exp >= (64 + FLOAT32_BIAS)))  {
-		if (a.parts.sign) {
-			return (MIN_INT64);
-		}
-		return MAX_INT64;
-	}
+	if (isFloat32NaN(a))
+		return INT64_MAX;
+	
+	if (isFloat32Infinity(a) || (a.parts.exp >= (64 + FLOAT32_BIAS))) {
+		if (a.parts.sign)
+			return INT64_MIN;
+		
+		return INT64_MAX;
+	}
+	
 	return _float32_to_uint64_helper(a);
-}	
+}
 
 
@@ -360,16 +360,16 @@
 uint32_t float64_to_uint32(float64 a)
 {
-	if (isFloat64NaN(a)) {
-		return MAX_UINT32;
-	}
-	
-	if (isFloat64Infinity(a) || (a.parts.exp >= (32 + FLOAT64_BIAS)))  {
-		if (a.parts.sign) {
-			return MIN_UINT32;
-		}
-		return MAX_UINT32;
-	}
-	
-	return (uint32_t)_float64_to_uint64_helper(a);	
+	if (isFloat64NaN(a))
+		return UINT32_MAX;
+	
+	
+	if (isFloat64Infinity(a) || (a.parts.exp >= (32 + FLOAT64_BIAS))) {
+		if (a.parts.sign)
+			return UINT32_MIN;
+		
+		return UINT32_MAX;
+	}
+	
+	return (uint32_t) _float64_to_uint64_helper(a);
 }
 
@@ -380,16 +380,17 @@
 int32_t float64_to_int32(float64 a)
 {
-	if (isFloat64NaN(a)) {
-		return MAX_INT32;
-	}
-	
-	if (isFloat64Infinity(a) || (a.parts.exp >= (32 + FLOAT64_BIAS)))  {
-		if (a.parts.sign) {
-			return MIN_INT32;
-		}
-		return MAX_INT32;
-	}
-	return (int32_t)_float64_to_uint64_helper(a);
-}	
+	if (isFloat64NaN(a))
+		return INT32_MAX;
+	
+	
+	if (isFloat64Infinity(a) || (a.parts.exp >= (32 + FLOAT64_BIAS))) {
+		if (a.parts.sign)
+			return INT32_MIN;
+		
+		return INT32_MAX;
+	}
+	
+	return (int32_t) _float64_to_uint64_helper(a);
+}
 
 /** Convert unsigned integer to float32
