Skip to content

Commit a41f8f9

Browse files
restyled-commitssuneelsignify
authored andcommitted
Restyled by clang-format
1 parent 623e064 commit a41f8f9

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/app/util/af-types.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ struct EmberAfDefinedEndpoint
240240
/**
241241
* Unique Id for this end point.
242242
*/
243-
char endpointUniqueId[chip::app::Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength()] = {0};
243+
char endpointUniqueId[chip::app::Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength()] = { 0 };
244244
};
245245

246246
/**

src/app/util/attribute-storage.cpp

+9-8
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,14 @@ CHIP_ERROR emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const EmberA
317317
}
318318
}
319319
}
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());
327328

328329
// Start the endpoint off as disabled.
329330
emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isEnabled);
@@ -1094,7 +1095,7 @@ CHIP_ERROR GetEndpointUniqueIdForEndPoint(EndpointId endpoint, chip::MutableChar
10941095
}
10951096
chip::CharSpan epUniqueIdSpan(emAfEndpoints[endpointIndex].endpointUniqueId,
10961097
strnlen(emAfEndpoints[endpointIndex].endpointUniqueId,
1097-
Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength()));
1098+
Clusters::Descriptor::Attributes::EndpointUniqueId::TypeInfo::MaxLength()));
10981099
chip::CopyCharSpanToMutableCharSpan(epUniqueIdSpan, epUniqueIdMutSpan);
10991100

11001101
return CHIP_NO_ERROR;

src/app/util/attribute-storage.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,7 @@ void emberAfEndpointConfigure();
261261
//
262262
CHIP_ERROR emberAfSetDynamicEndpoint(uint16_t index, chip::EndpointId id, const EmberAfEndpointType * ep,
263263
const chip::Span<chip::DataVersion> & dataVersionStorage,
264-
chip::Span<const EmberAfDeviceType> deviceTypeList = {},
265-
chip::CharSpan endpointUniqueId ={},
264+
chip::Span<const EmberAfDeviceType> deviceTypeList = {}, chip::CharSpan endpointUniqueId = {},
266265
chip::EndpointId parentEndpointId = chip::kInvalidEndpointId);
267266
chip::EndpointId emberAfClearDynamicEndpoint(uint16_t index);
268267
uint16_t emberAfGetDynamicIndexFromEndpoint(chip::EndpointId id);

0 commit comments

Comments
 (0)