@@ -317,13 +317,14 @@ CHIP_ERROR emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const EmberA
317
317
}
318
318
}
319
319
}
320
- emAfEndpoints[index ].endpoint = id;
321
- emAfEndpoints[index ].deviceTypeList = deviceTypeList;
322
- emAfEndpoints[index ].endpointType = ep;
323
- emAfEndpoints[index ].dataVersions = dataVersionStorage.data ();
324
- memcpy ((void *)(emAfEndpoints[index ].endpointUniqueId ), endpointUniqueId.data (),
325
- endpointUniqueId.size () > Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength ()?
326
- Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength () : endpointUniqueId.size ());
320
+ emAfEndpoints[index ].endpoint = id;
321
+ emAfEndpoints[index ].deviceTypeList = deviceTypeList;
322
+ emAfEndpoints[index ].endpointType = ep;
323
+ emAfEndpoints[index ].dataVersions = dataVersionStorage.data ();
324
+ memcpy ((void *) (emAfEndpoints[index ].endpointUniqueId ), endpointUniqueId.data (),
325
+ endpointUniqueId.size () > Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength ()
326
+ ? Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength ()
327
+ : endpointUniqueId.size ());
327
328
328
329
// Start the endpoint off as disabled.
329
330
emAfEndpoints[index ].bitmask .Clear (EmberAfEndpointOptions::isEnabled);
@@ -1094,7 +1095,7 @@ CHIP_ERROR GetEndpointUniqueIdForEndPoint(EndpointId endpoint, chip::MutableChar
1094
1095
}
1095
1096
chip::CharSpan epUniqueIdSpan (emAfEndpoints[endpointIndex].endpointUniqueId ,
1096
1097
strnlen (emAfEndpoints[endpointIndex].endpointUniqueId ,
1097
- Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength ()));
1098
+ Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength ()));
1098
1099
chip::CopyCharSpanToMutableCharSpan (epUniqueIdSpan, epUniqueIdMutSpan);
1099
1100
1100
1101
return CHIP_NO_ERROR;
0 commit comments