diff --git a/CHANGELOG b/CHANGELOG
index 818b294..24d9872 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -30,6 +30,7 @@
   - note: it's no longer possible to multiple hosts in an ldap map spec.
   - note: if this is needed use only the map name and configure the URI
     entry in the ldap client configuration.
+- correct mistake in logic test in wildcard lookup.
 
 20/2/2007 autofs-5.0.1
 ----------------------
diff --git a/modules/lookup_file.c b/modules/lookup_file.c
index cc1964f..6346602 100644
--- a/modules/lookup_file.c
+++ b/modules/lookup_file.c
@@ -979,12 +979,12 @@ static int check_map_indirect(struct autofs_point *ap,
 			}
 		} else {
 			/* Wildcard not in map but now is */
-			if (wild & (CHE_OK || CHE_UPDATED))
+			if (wild & (CHE_OK | CHE_UPDATED))
 				source->stale = 1;
 		}
 		pthread_cleanup_pop(1);
 
-		if (wild & (CHE_OK || CHE_UPDATED))
+		if (wild & (CHE_OK | CHE_UPDATED))
 			return NSS_STATUS_SUCCESS;
 	}
 
diff --git a/modules/lookup_nisplus.c b/modules/lookup_nisplus.c
index eae8702..83e99e0 100644
--- a/modules/lookup_nisplus.c
+++ b/modules/lookup_nisplus.c
@@ -438,12 +438,12 @@ static int check_map_indirect(struct autofs_point *ap,
 			}
 		} else {
 			/* Wildcard not in map but now is */
-			if (wild & (CHE_OK || CHE_UPDATED))
+			if (wild & (CHE_OK | CHE_UPDATED))
 				source->stale = 1;
 		}
 		pthread_cleanup_pop(1);
 
-		if (wild & (CHE_UPDATED || CHE_OK))
+		if (wild & (CHE_UPDATED | CHE_OK))
 			return NSS_STATUS_SUCCESS;
 	}
 
diff --git a/modules/lookup_yp.c b/modules/lookup_yp.c
index 5a154cd..da280cc 100644
--- a/modules/lookup_yp.c
+++ b/modules/lookup_yp.c
@@ -523,12 +523,12 @@ static int check_map_indirect(struct autofs_point *ap,
 			}
 		} else {
 			/* Wildcard not in map but now is */
-			if (wild & (CHE_OK || CHE_UPDATED))
+			if (wild & (CHE_OK | CHE_UPDATED))
 				source->stale = 1;
 		}
 		pthread_cleanup_pop(1);
 
-		if (wild & (CHE_OK || CHE_UPDATED))
+		if (wild & (CHE_OK | CHE_UPDATED))
 			return NSS_STATUS_SUCCESS;
 	}