Erratum hrev49359: Compare size with 0 rather that B_OK

Thanks Ingo!
This commit is contained in:
Philippe Saint-Pierre 2015-07-04 11:22:25 -04:00
parent 58df0d94f3
commit dfcbef64f6
3 changed files with 3 additions and 3 deletions

View File

@ -120,7 +120,7 @@ PrinterSettings::WriteSettings(BMessage* msg)
status_t err = B_ERROR;
length = msg->FlattenedSize();
if (length < B_OK)
if (length < 0)
return length;
data = (char *) malloc(length);
if (data != NULL) {

View File

@ -204,7 +204,7 @@ BNetBuffer::AppendMessage(const BMessage& data)
ssize_t dataSize = data.FlattenedSize();
if (dataSize < B_OK)
if (dataSize < 0)
return dataSize;
if (dataSize == 0)

View File

@ -429,7 +429,7 @@ TTracker::QuitRequested()
// if message is empty, delete the corresponding attribute
if (message.CountNames(B_ANY_TYPE)) {
ssize_t size = message.FlattenedSize();
if (size > B_OK) {
if (size > 0) {
char* buffer = new char[size];
message.Flatten(buffer, size);
deskDir.WriteAttr(kAttrOpenWindows, B_MESSAGE_TYPE, 0, buffer,