about summary refs log tree commit diff
path: root/stdio-common/_itoa.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/_itoa.c')
-rw-r--r--stdio-common/_itoa.c47
1 files changed, 25 insertions, 22 deletions
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
index 845928903c..e3b0533476 100644
--- a/stdio-common/_itoa.c
+++ b/stdio-common/_itoa.c
@@ -182,29 +182,32 @@ _itoa (value, buflim, base, upper_case)
 	  mp_limb_t work_hi = value >> (64 - BITS_PER_MP_LIMB);		  \
 									  \
 	  if (BITS_PER_MP_LIMB == 32)					  \
-	    if (work_hi != 0)						  \
-	      {								  \
-		mp_limb_t work_lo;					  \
-		int cnt;						  \
+	    {								  \
+	      if (work_hi != 0)						  \
+		{							  \
+		  mp_limb_t work_lo;					  \
+		  int cnt;						  \
 									  \
-		work_lo = value & 0xfffffffful;				  \
-		for (cnt = BITS_PER_MP_LIMB / BITS; cnt > 0; --cnt)	  \
-		  {							  \
-		    *--bp = digits[work_lo & ((1ul << BITS) - 1)];	  \
-		    work_lo >>= BITS;					  \
-		  }							  \
-		if (BITS_PER_MP_LIMB % BITS != 0)			  \
-		  {							  \
-		    work_lo |= ((work_hi				  \
-				 & ((1 << (BITS - BITS_PER_MP_LIMB%BITS)) \
-				    - 1))				  \
-				<< BITS_PER_MP_LIMB % BITS);		  \
-		    *--bp = digits[work_lo];				  \
-		    work_hi >>= BITS - BITS_PER_MP_LIMB % BITS;		  \
-		  }							  \
-	      }								  \
-	    else							  \
-	      work_hi = value & 0xfffffffful;				  \
+		  work_lo = value & 0xfffffffful;			  \
+		  for (cnt = BITS_PER_MP_LIMB / BITS; cnt > 0; --cnt)	  \
+		    {							  \
+		      *--bp = digits[work_lo & ((1ul << BITS) - 1)];	  \
+		      work_lo >>= BITS;					  \
+		    }							  \
+		  if (BITS_PER_MP_LIMB % BITS != 0)			  \
+		    {							  \
+		      work_lo						  \
+			|= ((work_hi					  \
+			     & ((1 << (BITS - BITS_PER_MP_LIMB%BITS))	  \
+				- 1))					  \
+			    << BITS_PER_MP_LIMB % BITS);		  \
+		      *--bp = digits[work_lo];				  \
+		      work_hi >>= BITS - BITS_PER_MP_LIMB % BITS;	  \
+		    }							  \
+		}							  \
+	      else							  \
+		work_hi = value & 0xfffffffful;				  \
+	    }								  \
 	  do								  \
 	    {								  \
 	      *--bp = digits[work_hi & ((1 << BITS) - 1)];		  \