diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 1bc59df..2e09412 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -3637,21 +3637,21 @@
     return result;
 }
 
-bool validateCommandBuffersNotInUse(const layer_data* dev_data, VkCommandPool commandPool) {
-    bool skip_call = false;
+VkBool32 validateCommandBuffersNotInUse(const layer_data* dev_data, VkCommandPool commandPool) {
+    VkBool32 skipCall = VK_FALSE;
     loader_platform_thread_lock_mutex(&globalLock);
     auto pool_data = dev_data->commandPoolMap.find(commandPool);
     if (pool_data != dev_data->commandPoolMap.end()) {
         for (auto cmdBuffer : pool_data->second.commandBuffers) {
             if (dev_data->inFlightCmdBuffers.count(cmdBuffer)) {
-                skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT, reinterpret_cast<uint64_t>(commandPool),
-                                     __LINE__, DRAWSTATE_OBJECT_INUSE, "DS", "Cannot reset command pool %" PRIx64 " when allocated command buffer %" PRIx64 " is in use.",
-                                     reinterpret_cast<uint64_t>(commandPool), reinterpret_cast<uint64_t>(cmdBuffer));
+                skipCall |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT, (uint64_t)(commandPool),
+                                    __LINE__, DRAWSTATE_OBJECT_INUSE, "DS", "Cannot reset command pool %" PRIx64 " when allocated command buffer %" PRIx64 " is in use.",
+                                    (uint64_t)(commandPool), (uint64_t)(cmdBuffer));
             }
         }
     }
     loader_platform_thread_unlock_mutex(&globalLock);
-    return skip_call;
+    return skipCall;
 }
 
 // Destroy commandPool along with all of the commandBuffers allocated from that pool
@@ -3673,7 +3673,7 @@
 
     loader_platform_thread_unlock_mutex(&globalLock);
 
-    if (validateCommandBuffersNotInUse(dev_data, commandPool))
+    if (VK_TRUE == validateCommandBuffersNotInUse(dev_data, commandPool))
         return;
 
     dev_data->device_dispatch_table->DestroyCommandPool(device, commandPool, pAllocator);
@@ -3687,7 +3687,7 @@
     layer_data *dev_data               = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
     VkResult    result                = VK_ERROR_VALIDATION_FAILED_EXT;
 
-    if (validateCommandBuffersNotInUse(dev_data, commandPool))
+    if (VK_TRUE == validateCommandBuffersNotInUse(dev_data, commandPool))
         return VK_ERROR_VALIDATION_FAILED_EXT;
 
     result = dev_data->device_dispatch_table->ResetCommandPool(device, commandPool, flags);
