OSDN Git Service

Correct defective activation logic for some debugging hooks.
[mingw/mingw-get.git] / src / pkgunst.cpp
index dcf1161..6157958 100644 (file)
@@ -103,7 +103,7 @@ int pkgActionItem::SetAuthorities( pkgActionItem *current )
         * package which has been identified as "installed"...
         */
        const char *tarname = ref->GetPropVal( tarname_key, value_unknown );
-       DEBUG_INVOKE_IF( DEBUGLEVEL && DEBUG_TRACE_INIT,
+       DEBUG_INVOKE_IF( DEBUGLEVEL & DEBUG_TRACE_INIT,
            dmh_printf( "%s: selected for %s\n",
              (tarname = ref->GetPropVal( tarname_key, value_unknown )),
              (current->flags & ACTION_INSTALL) ? "upgrade" : "removal"
@@ -116,7 +116,7 @@ int pkgActionItem::SetAuthorities( pkgActionItem *current )
        {
          /* ...and then, having confirmed its validity...
           */
-         DEBUG_INVOKE_IF( DEBUGLEVEL && DEBUG_TRACE_INIT,
+         DEBUG_INVOKE_IF( DEBUGLEVEL & DEBUG_TRACE_INIT,
              dmh_printf( "%s: marked for %s\n",
                ref->GetPropVal( tarname_key, value_unknown ),
                (current->flags & ACTION_INSTALL) ? "upgrade" : "removal"
@@ -252,7 +252,7 @@ int pkg_rmdir( const char *sysroot, const char *pathname )
     char fullpath[ 1 + snprintf( NULL, 0, pkg_path_format, sysroot, pathname ) ];
     snprintf( fullpath, sizeof( fullpath ), pkg_path_format, sysroot, pathname );
 
-    DEBUG_INVOKE_IF( DEBUGLEVEL && DEBUG_TRACE_TRANSACTIONS,
+    DEBUG_INVOKE_IF( DEBUGLEVEL & DEBUG_TRACE_TRANSACTIONS,
        dmh_printf( "  %s: rmdir\n", fullpath )
       );
 
@@ -276,7 +276,7 @@ int pkg_unlink( const char *sysroot, const char *pathname )
     char filepath[ 1 + snprintf( NULL, 0, pkg_path_format, sysroot, pathname ) ];
     snprintf( filepath, sizeof( filepath ), pkg_path_format, sysroot, pathname );
 
-    DEBUG_INVOKE_IF( DEBUGLEVEL && DEBUG_TRACE_TRANSACTIONS,
+    DEBUG_INVOKE_IF( DEBUGLEVEL & DEBUG_TRACE_TRANSACTIONS,
        dmh_printf( "  %s: unlink file\n", filepath )
       );