Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Aug 2019 20:23:49 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r351583 - stable/11/sbin/camcontrol
Message-ID:  <201908282023.x7SKNnaS070321@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Aug 28 20:23:49 2019
New Revision: 351583
URL: https://svnweb.freebsd.org/changeset/base/351583

Log:
  MFC r350677: Make GCC happy about math in r350676.

Modified:
  stable/11/sbin/camcontrol/modeedit.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/camcontrol/modeedit.c
==============================================================================
--- stable/11/sbin/camcontrol/modeedit.c	Wed Aug 28 20:23:08 2019	(r351582)
+++ stable/11/sbin/camcontrol/modeedit.c	Wed Aug 28 20:23:49 2019	(r351583)
@@ -295,11 +295,8 @@ editentry_set(char *name, char *newvalue, int editonly
 /*
  * Macro to determine the maximum value of the given size for the current
  * resolution.
- * XXX Lovely x86's optimize out the case of shifting by 32 and gcc doesn't
- *     currently workaround it (even for int64's), so we have to kludge it.
  */
-#define	RESOLUTION_MAX(size) ((resolution * (size) == 32)? 		\
-	UINT_MAX: (1 << (resolution * (size))) - 1)
+#define	RESOLUTION_MAX(size)	((1LL << (resolution * (size))) - 1)
 
 	assert(newvalue != NULL);
 	if (*newvalue == '\0')



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908282023.x7SKNnaS070321>