From f17ddab827e51367e570e06d671752d1e3b4b2ac Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 24 Jun 2012 00:31:10 +0200 Subject: [PATCH] Initialize the BKey to default values and set fCreationTime. * Using Unset() initializes the BKey to default values. * Also set fCreationTime to 0 for now. It is still unused but needs to have a stable value for the exact matches when comparing keys. --- src/kits/app/Key.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kits/app/Key.cpp b/src/kits/app/Key.cpp index a9d8d16e9e..ffe5374c30 100644 --- a/src/kits/app/Key.cpp +++ b/src/kits/app/Key.cpp @@ -32,6 +32,7 @@ CompareLists(BObjectList a, BObjectList b) BKey::BKey() { + Unset(); } @@ -44,6 +45,7 @@ BKey::BKey(BKeyPurpose purpose, const char* identifier, BKey::BKey(BKey& other) { + *this = other; } @@ -63,6 +65,7 @@ status_t BKey::SetTo(BKeyPurpose purpose, const char* identifier, const char* secondaryIdentifier, const uint8* data, size_t length) { + fCreationTime = 0; SetPurpose(purpose); SetIdentifier(identifier); SetSecondaryIdentifier(secondaryIdentifier);