Index: /trunk/ippTools/src/chiptool.c
===================================================================
--- /trunk/ippTools/src/chiptool.c	(revision 25789)
+++ /trunk/ippTools/src/chiptool.c	(revision 25790)
@@ -623,6 +623,6 @@
         psStringAppend(&query, " WHERE %s", whereClause);
         psFree(whereClause);
-    } else if (!psMetadataLookupBool(NULL, config->args, "-all") && (faulted || where2)) {
-        psStringAppend(&query, " WHERE chipRun.chip_id IS NOT NULL %s", where2);
+    } else if (psMetadataLookupBool(NULL, config->args, "-all") || (faulted || where2)) {
+        psStringAppend(&query, " WHERE chipRun.chip_id IS NOT NULL %s", where2 ? where2 : "");
     } else {
         psFree(where);
Index: /trunk/ippTools/src/difftool.c
===================================================================
--- /trunk/ippTools/src/difftool.c	(revision 25789)
+++ /trunk/ippTools/src/difftool.c	(revision 25790)
@@ -706,9 +706,7 @@
         psStringAppend(&query, " WHERE %s", whereClause);
         psFree(whereClause);
-    } else if (all) {
-        if (where2) {
-            psStringAppend(&query, " WHERE diffRun.diff_id is not null %s", where2);
-        }
-    } else {
+    } else if (where2) {
+        psStringAppend(&query, " WHERE diffRun.diff_id is not null %s", where2);
+    } else if (!all) {
         psError(PXTOOLS_ERR_DATA, true, "search parameters or -all are required");
         return false;
