From 80512200a7f9521f8afea2fa2ea6fb47415ba183 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 15 Feb 2022 19:00:45 -0500 Subject: [PATCH] Fix backwards string check in ESP32 all-clustes-app CHIPDeviceManager. (#15187) Rookie mistake, getting confused about strcmp return value truthiness. --- examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp b/examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp index 59f822bb017cd9..b53dea2de9d10b 100644 --- a/examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp @@ -32,6 +32,8 @@ #include #include +#include "esp_log.h" + using namespace ::chip; namespace chip { @@ -101,7 +103,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & { TaskHandle_t task = xTaskGetCurrentTaskHandle(); const char * name = pcTaskGetName(task); - if (!strcmp(name, "CHIP")) + if (strcmp(name, "CHIP")) { ESP_LOGE("all-clusters-app", "Attribute changed on non-Matter task '%s'\n", name); }