Skip to content

Commit e2ef26e

Browse files
committed
Fixed sizeof-array-decay warning.
1 parent c432550 commit e2ef26e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/clusters/service-area-server/service-area-cluster-objects.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc
147147
// Save the location name to buffer, so access and lifetime is controlled.
148148
// If aLocationName is not null, create a CharSpan to reference the text.
149149
// Make sure there is always a terminating character, mainly so we can get c_str for logging.
150-
memset(mLocationNameBuffer, 0, sizeof(mLocationNameBuffer + 1));
150+
memset(mLocationNameBuffer, 0, sizeof(mLocationNameBuffer));
151151

152152
// this assumes locationInfo structure was created above, if appropriate
153153
if (!locationInfo.locationInfo.IsNull())
@@ -326,7 +326,7 @@ struct MapStructureWrapper : public chip::app::Clusters::ServiceArea::Structs::M
326326
// Save the map name to the buffer so that access and lifetime is controlled.
327327
// Create a CharSpan reference the text.
328328
// Make sure there is always a terminating character, mainly so we can get c_str for logging.
329-
memset(mMapNameBuffer, 0, sizeof(mMapNameBuffer + 1));
329+
memset(mMapNameBuffer, 0, sizeof(mMapNameBuffer));
330330

331331
if (aMapName.size() == 0)
332332
{

0 commit comments

Comments
 (0)