Skip to content

Commit

Permalink
Fix backwards string check in ESP32 all-clustes-app CHIPDeviceManager. (
Browse files Browse the repository at this point in the history
#15187)

Rookie mistake, getting confused about strcmp return value truthiness.
  • Loading branch information
bzbarsky-apple authored Feb 16, 2022
1 parent 3624b26 commit 3828308
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <lib/support/ErrorStr.h>
#include <setup_payload/SetupPayload.h>

#include "esp_log.h"

using namespace ::chip;

namespace chip {
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 3828308

Please sign in to comment.