From 99373329bbb9699506819c6d8a142849c90ec78d Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Wed, 23 Feb 2022 07:28:17 -0800 Subject: [PATCH] Fixed Undefined VendoId Value is 0xFFFF (Not 0x0). (#15428) --- src/credentials/FabricTable.h | 6 +++--- src/lib/core/PeerId.h | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index e394f3e9563a79..86ba079ab5bac1 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -236,7 +236,7 @@ class DLL_EXPORT FabricInfo void Reset() { mOperationalId = PeerId(); - mVendorId = kUndefinedVendorId; + mVendorId = VendorId::NotSpecified; mFabricLabel[0] = '\0'; if (mOperationalKey != nullptr) @@ -260,7 +260,7 @@ class DLL_EXPORT FabricInfo PeerId mOperationalId; FabricIndex mFabric = kUndefinedFabricIndex; - uint16_t mVendorId = kUndefinedVendorId; + uint16_t mVendorId = VendorId::NotSpecified; char mFabricLabel[kFabricLabelMaxLengthInBytes + 1] = { '\0' }; #ifdef ENABLE_HSM_CASE_OPS_KEY diff --git a/src/lib/core/PeerId.h b/src/lib/core/PeerId.h index 7cf54863d1bba0..7155ee32f62d42 100644 --- a/src/lib/core/PeerId.h +++ b/src/lib/core/PeerId.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ using FabricId = uint64_t; constexpr CompressedFabricId kUndefinedCompressedFabricId = 0ULL; constexpr FabricId kUndefinedFabricId = 0ULL; -constexpr uint16_t kUndefinedVendorId = 0U; /// A peer is identified by a node id within a compressed fabric ID class PeerId