svn commit: r270246 - head/bin/sh

Jilles Tjoelker jilles at FreeBSD.org
Wed Aug 20 20:15:44 UTC 2014


Author: jilles
Date: Wed Aug 20 20:15:43 2014
New Revision: 270246
URL: http://svnweb.freebsd.org/changeset/base/270246

Log:
  sh: Remove two redundant (uintmax_t) casts.
  
  Submitted by:	jmallett

Modified:
  head/bin/sh/arith_yacc.c

Modified: head/bin/sh/arith_yacc.c
==============================================================================
--- head/bin/sh/arith_yacc.c	Wed Aug 20 20:12:05 2014	(r270245)
+++ head/bin/sh/arith_yacc.c	Wed Aug 20 20:15:43 2014	(r270246)
@@ -139,10 +139,9 @@ static arith_t do_binop(int op, arith_t 
 	case ARITH_SUB:
 		return (uintmax_t)a - (uintmax_t)b;
 	case ARITH_LSHIFT:
-		return (uintmax_t)a <<
-		    ((uintmax_t)b & (sizeof(uintmax_t) * CHAR_BIT - 1));
+		return (uintmax_t)a << (b & (sizeof(uintmax_t) * CHAR_BIT - 1));
 	case ARITH_RSHIFT:
-		return a >> ((uintmax_t)b & (sizeof(uintmax_t) * CHAR_BIT - 1));
+		return a >> (b & (sizeof(uintmax_t) * CHAR_BIT - 1));
 	case ARITH_LT:
 		return a < b;
 	case ARITH_LE:


More information about the svn-src-all mailing list