Skip to content

Commit

Permalink
Erratum hrev49359: Compare size with 0 rather that B_OK
Browse files Browse the repository at this point in the history
Thanks Ingo!
  • Loading branch information
stpere committed Jul 4, 2015
1 parent 58df0d9 commit dfcbef6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/add-ons/print/drivers/pdf/source/PrinterSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/kits/network/libnetapi/NetBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/kits/tracker/Tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dfcbef6

Please sign in to comment.