Skip to content

Commit

Permalink
fix GetSerialNumber when CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER is used (
Browse files Browse the repository at this point in the history
#20475) (#20494)

Co-authored-by: eve-cxrp <[email protected]>
  • Loading branch information
woody-apple and eve-cxrp authored Jul 9, 2022
1 parent 01b1b87 commit 9bf15ff
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetSerialNumber(char
ReturnErrorCodeIf(sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) > bufSize, CHIP_ERROR_BUFFER_TOO_SMALL);
memcpy(buf, CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER, sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER));
serialNumLen = sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) - 1;
err = CHIP_NO_ERROR;
}
#endif // CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
ReturnErrorOnFailure(err);
Expand Down

0 comments on commit 9bf15ff

Please sign in to comment.