From 4210ed011a39e4e1b3fcba4c7c0d18844b4b3522 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 15 Apr 2013 01:36:59 +0200 Subject: [PATCH] Fix BMessage::GetInfo() return value check Since B_OK is 0, the change doesn't affect the semantics. --- src/kits/package/DaemonClient.cpp | 2 +- src/kits/package/PackageInfo.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kits/package/DaemonClient.cpp b/src/kits/package/DaemonClient.cpp index 10d35c0de0..f14801f51e 100644 --- a/src/kits/package/DaemonClient.cpp +++ b/src/kits/package/DaemonClient.cpp @@ -107,7 +107,7 @@ BDaemonClient::_ExtractPackageInfoSet(const BMessage& message, // get the number of items type_code type; int32 count; - if (message.GetInfo(field, &type, &count)) { + if (message.GetInfo(field, &type, &count) != B_OK) { // the field is missing return B_OK; } diff --git a/src/kits/package/PackageInfo.cpp b/src/kits/package/PackageInfo.cpp index ed9d27f318..b0bd3b9e7b 100644 --- a/src/kits/package/PackageInfo.cpp +++ b/src/kits/package/PackageInfo.cpp @@ -2033,7 +2033,7 @@ BPackageInfo::_ExtractStringList(BMessage* archive, const char* field, // get the number of items type_code type; int32 count; - if (archive->GetInfo(field, &type, &count)) { + if (archive->GetInfo(field, &type, &count) != B_OK) { // the field is missing return B_OK; } @@ -2071,7 +2071,7 @@ BPackageInfo::_ExtractResolvables(BMessage* archive, const char* field, // get the number of items type_code type; int32 count; - if (archive->GetInfo(nameField, &type, &count)) { + if (archive->GetInfo(nameField, &type, &count) != B_OK) { // the field is missing return B_OK; } @@ -2130,7 +2130,7 @@ BPackageInfo::_ExtractResolvableExpressions(BMessage* archive, // get the number of items type_code type; int32 count; - if (archive->GetInfo(nameField, &type, &count)) { + if (archive->GetInfo(nameField, &type, &count) != B_OK) { // the field is missing return B_OK; }