10002 librcm: bitwise comparison always evaluates to false
Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Alexander Pyhalov <apyhalov@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
diff --git a/usr/src/lib/librcm/librcm.c b/usr/src/lib/librcm/librcm.c
index d3f7666..0c25033 100644
--- a/usr/src/lib/librcm/librcm.c
+++ b/usr/src/lib/librcm/librcm.c
@@ -72,7 +72,7 @@
 
 	if (modname) {
 		(void) snprintf(namebuf, MAXPATHLEN, "%s%s", modname,
-			RCM_MODULE_SUFFIX);
+		    RCM_MODULE_SUFFIX);
 
 		if ((hd->modname = strdup(namebuf)) == NULL) {
 			free(hd);
@@ -135,8 +135,8 @@
 	/*
 	 * rsrcname may be NULL if requesting dr operations or modinfo
 	 */
-	if ((rsrcname == NULL) &&
-	    ((flag & RCM_DR_OPERATION|RCM_MOD_INFO) == 0)) {
+	if (rsrcname == NULL &&
+	    (flag & (RCM_DR_OPERATION | RCM_MOD_INFO)) == 0) {
 		errno = EINVAL;
 		return (RCM_FAILURE);
 	}
@@ -897,7 +897,7 @@
 	char *tmp;
 
 	if (((tmp = strstr(filename, RCM_MODULE_SUFFIX)) != NULL) &&
-		(tmp[strlen(RCM_MODULE_SUFFIX)] == '\0'))
+	    (tmp[strlen(RCM_MODULE_SUFFIX)] == '\0'))
 		return (0);
 	else
 		return (1);