From 10284961ab9a3e2ce068ba6fe18dd348281ccdca Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Thu, 28 Sep 2023 13:35:10 +0530 Subject: [PATCH] Fix span usage in platform/ESP32 (#29482) * Fix span usage in platform/ESP32 * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/platform/ESP32/WiFiDnssdImpl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform/ESP32/WiFiDnssdImpl.cpp b/src/platform/ESP32/WiFiDnssdImpl.cpp index 14139083e09a13..b927dd28fec0f2 100644 --- a/src/platform/ESP32/WiFiDnssdImpl.cpp +++ b/src/platform/ESP32/WiFiDnssdImpl.cpp @@ -469,7 +469,7 @@ static CHIP_ERROR OnResolveDone(ResolveContext * ctx) exit: if (error != CHIP_NO_ERROR) { - ctx->mResolveCb(ctx->mCbContext, nullptr, Span(nullptr, 0), error); + ctx->mResolveCb(ctx->mCbContext, nullptr, Span(), error); } else { @@ -530,7 +530,7 @@ static void MdnsQueryDone(intptr_t context) #endif if (!result) { - resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span(nullptr, 0), CHIP_ERROR_INVALID_ARGUMENT); + resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span(), CHIP_ERROR_INVALID_ARGUMENT); RemoveMdnsQuery(ctx); return; } @@ -549,10 +549,10 @@ static void MdnsQueryDone(intptr_t context) mdns_query_async_delete(resolveCtx->mSrvQueryHandle); resolveCtx->mAddrQueryResult = nullptr; resolveCtx->mSrvQueryHandle = mdns_query_async_new(result->hostname, NULL, NULL, MDNS_TYPE_AAAA, kTimeoutMilli, - kMaxResults, MdnsQueryNotifier); + kMaxResults, MdnsQueryNotifier); if (!resolveCtx->mSrvQueryHandle) { - resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span(nullptr, 0), CHIP_ERROR_NO_MEMORY); + resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span(), CHIP_ERROR_NO_MEMORY); RemoveMdnsQuery(ctx); return; } @@ -565,7 +565,7 @@ static void MdnsQueryDone(intptr_t context) } else { - resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span(nullptr, 0), CHIP_ERROR_INCORRECT_STATE); + resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span(), CHIP_ERROR_INCORRECT_STATE); RemoveMdnsQuery(ctx); return; }