Skip to content

Commit bc7d850

Browse files
committed
Fix mistake made when addressing PR comment
1 parent 1e60fee commit bc7d850

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ CHIP_ERROR EcosystemInformationServer::AddEcosystemInformationClusterToEndpoint(
258258
// We expect that the device has not been previously added.
259259
VerifyOrReturnError((it == mDevicesMap.end()), CHIP_ERROR_INCORRECT_STATE);
260260
// This create an empty DeviceInfo in mDevicesMap.
261-
mDevicesMap[aEndpoint];
261+
mDevicesMap[aEndpoint] = DeviceInfo();
262262
return CHIP_NO_ERROR;
263263
}
264264

@@ -267,7 +267,7 @@ CHIP_ERROR EcosystemInformationServer::AddDeviceInfo(EndpointId aEndpoint, std::
267267
VerifyOrReturnError(aDevice, CHIP_ERROR_INVALID_ARGUMENT);
268268
VerifyOrReturnError((aEndpoint != kRootEndpointId && aEndpoint != kInvalidEndpointId), CHIP_ERROR_INVALID_ARGUMENT);
269269

270-
auto & deviceInfo = mDevicesMap[aEndpoint] = DeviceInfo();
270+
auto & deviceInfo = mDevicesMap[aEndpoint];
271271
VerifyOrReturnError((deviceInfo.mDeviceDirectory.size() < kDeviceDirectoryMaxSize), CHIP_ERROR_NO_MEMORY);
272272
deviceInfo.mDeviceDirectory.push_back(std::move(aDevice));
273273
return CHIP_NO_ERROR;

0 commit comments

Comments
 (0)