Skip to content

Commit

Permalink
PVS 78-85: useless checks
Browse files Browse the repository at this point in the history
* These were always true, so remove them.
  • Loading branch information
pulkomandy committed Jul 26, 2015
1 parent 32a6b04 commit 69ee6a6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/build/libbe/storage/AppFileInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ BAppFileInfo::SetType(const char* type)
{
// check initialization
status_t error = B_OK;
if (error == B_OK && InitCheck() != B_OK)
if (InitCheck() != B_OK)
error = B_NO_INIT;
if (error == B_OK) {
if (type != NULL) {
// check param
size_t typeLen = strlen(type);
if (error == B_OK && typeLen >= B_MIME_TYPE_LENGTH)
if (typeLen >= B_MIME_TYPE_LENGTH)
error = B_BAD_VALUE;
// write the data
if (error == B_OK) {
Expand Down Expand Up @@ -230,13 +230,13 @@ BAppFileInfo::SetSignature(const char* signature)
{
// check initialization
status_t error = B_OK;
if (error == B_OK && InitCheck() != B_OK)
if (B_OK && InitCheck() != B_OK)
error = B_NO_INIT;
if (error == B_OK) {
if (signature) {
// check param
size_t signatureLen = strlen(signature);
if (error == B_OK && signatureLen >= B_MIME_TYPE_LENGTH)
if (signatureLen >= B_MIME_TYPE_LENGTH)
error = B_BAD_VALUE;
// write the data
if (error == B_OK) {
Expand Down Expand Up @@ -318,7 +318,7 @@ BAppFileInfo::SetAppFlags(uint32 flags)
{
// check initialization
status_t error = B_OK;
if (error == B_OK && InitCheck() != B_OK)
if (InitCheck() != B_OK)
error = B_NO_INIT;
if (error == B_OK) {
// write the data
Expand All @@ -334,7 +334,7 @@ BAppFileInfo::RemoveAppFlags()
{
// check initialization
status_t error = B_OK;
if (error == B_OK && InitCheck() != B_OK)
if (InitCheck() != B_OK)
error = B_NO_INIT;
if (error == B_OK) {
// remove the data
Expand Down Expand Up @@ -373,7 +373,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage* types, bool updateMimeDB,
{
// check initialization
status_t error = B_OK;
if (error == B_OK && InitCheck() != B_OK)
if (InitCheck() != B_OK)
error = B_NO_INIT;

BMimeType mimeType;
Expand Down Expand Up @@ -590,7 +590,7 @@ BAppFileInfo::SetVersionInfo(const version_info* info, version_kind kind)
{
// check initialization
status_t error = B_OK;
if (error == B_OK && InitCheck() != B_OK)
if (InitCheck() != B_OK)
error = B_NO_INIT;
if (error == B_OK) {
if (info != NULL) {
Expand Down

0 comments on commit 69ee6a6

Please sign in to comment.