Roster: Fix PVS 456-459

Remove unneed if condition, since 'error' is initialized to B_OK.

Change-Id: I2fd0edb99a3d055beafaf15f1140071a31140892
Reviewed-on: https://review.haiku-os.org/798
Reviewed-by: Barrett17 <[email protected]>
This commit is contained in:
Murai Takashi
2018-12-25 17:49:46 +00:00
committed by Barrett17
parent 09a5380d0c
commit ab6bcb08bc
+4 -4
View File
@@ -1471,7 +1471,7 @@ BRoster::_SetSignature(team_id team, const char* signature) const
// compose the request message // compose the request message
BMessage request(B_REG_SET_SIGNATURE); BMessage request(B_REG_SET_SIGNATURE);
if (error == B_OK && team >= 0) if (team >= 0)
error = request.AddInt32("team", team); error = request.AddInt32("team", team);
if (error == B_OK && signature) if (error == B_OK && signature)
@@ -1573,7 +1573,7 @@ BRoster::_CompleteRegistration(team_id team, thread_id thread,
// compose the request message // compose the request message
BMessage request(B_REG_COMPLETE_REGISTRATION); BMessage request(B_REG_COMPLETE_REGISTRATION);
if (error == B_OK && team >= 0) if (team >= 0)
error = request.AddInt32("team", team); error = request.AddInt32("team", team);
if (error == B_OK && thread >= 0) if (error == B_OK && thread >= 0)
@@ -1624,7 +1624,7 @@ BRoster::_IsAppRegistered(const entry_ref* ref, team_id team,
// compose the request message // compose the request message
BMessage request(B_REG_IS_APP_REGISTERED); BMessage request(B_REG_IS_APP_REGISTERED);
if (error == B_OK && ref) if (ref)
error = request.AddRef("ref", ref); error = request.AddRef("ref", ref);
if (error == B_OK && team >= 0) if (error == B_OK && team >= 0)
error = request.AddInt32("team", team); error = request.AddInt32("team", team);
@@ -1718,7 +1718,7 @@ BRoster::_RemoveApp(team_id team) const
// compose the request message // compose the request message
BMessage request(B_REG_REMOVE_APP); BMessage request(B_REG_REMOVE_APP);
if (error == B_OK && team >= 0) if (team >= 0)
error = request.AddInt32("team", team); error = request.AddInt32("team", team);
// send the request // send the request