Skip to content

Commit

Permalink
Fixed Undefined VendoId Value is 0xFFFF (Not 0x0). (#15428)
Browse files Browse the repository at this point in the history
  • Loading branch information
emargolis authored and pull[bot] committed Feb 25, 2022
1 parent b88e2df commit 9937332
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/credentials/FabricTable.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -236,7 +236,7 @@ class DLL_EXPORT FabricInfo
void Reset()
{
mOperationalId = PeerId();
mVendorId = kUndefinedVendorId;
mVendorId = VendorId::NotSpecified;
mFabricLabel[0] = '\0';

if (mOperationalKey != nullptr)
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/lib/core/PeerId.h
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 9937332

Please sign in to comment.