Skip to content

Commit

Permalink
Bug 1338086 - Remove useless else blocks in order to reduce complexit…
Browse files Browse the repository at this point in the history
…y in uriloader/exthandler/unix/ r=froydnj

MozReview-Commit-ID: HvmyxEwsnrg

--HG--
extra : rebase_source : c277cf5deb99e6ed47eaccea899f830efb59220b
  • Loading branch information
sylvestre committed Feb 9, 2017
1 parent ce25a09 commit 40c53d8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions uriloader/exthandler/unix/nsOSHelperAppService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@ nsOSHelperAppService::GetExtensionsAndDescriptionFromMimetypesFile(const nsAStri
aDescription.Assign(Substring(descriptionStart, descriptionEnd));
mimeFile->Close();
return NS_OK;
} else if (NS_FAILED(rv)) {
}
if (NS_FAILED(rv)) {
LOG(("Failed to parse entry: %s\n", NS_LossyConvertUTF16toASCII(entry).get()));
}

Expand Down Expand Up @@ -1113,11 +1114,11 @@ nsOSHelperAppService::GetHandlerAndDescriptionFromMailcapFile(const nsAString& a
// get out of here
mailcapFile->Close();
return NS_OK;
} else { // pretend that this match never happened
aDescription.Truncate();
aMozillaFlags.Truncate();
aHandler.Truncate();
}
// pretend that this match never happened
aDescription.Truncate();
aMozillaFlags.Truncate();
aHandler.Truncate();
}
}
// zero out the entry for the next cycle
Expand Down

0 comments on commit 40c53d8

Please sign in to comment.