Closed Bug 1674611 Opened 3 months ago Closed 2 months ago

nsNavHistoryResult.cpp: do not use 'else' after 'return'

Categories

(Toolkit :: Places, task, P5)

task
Points:
1

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: Sylvestre, Assigned: ankushsinghal1995)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=C++])

Attachments

(1 file)

Filling as a good first bug to learn workflows.

do not use 'else' after 'return':
https://searchfox.org/mozilla-central/source/toolkit/components/places/nsNavHistoryResult.cpp#3418-3437

As the change is trivial, it is just to learn how to contribute to Firefox.

Found by http://clang.llvm.org/extra/clang-tidy/checks/readability-else-after-return.html

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Component: General → Places
Product: Core → Toolkit
Severity: -- → S4
Priority: -- → P5

Removed the 'else' block after the return statement in the 'if' block

Assignee: nobody → ankushsinghal1995
Status: NEW → ASSIGNED

This is my first time contributing here. Please let me know if any other process needs to be followed.

You did it right, thank you. If you have further questions, feel free to ask.

Points: --- → 1
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/45e9724d1432
Removed the use of 'else' after 'return'. r=mak

Thanks for your review. Now that the commit has been pushed to the codebase, should I Resolve the bug?

It will be done automatically :)

autoland is a staging branch, the bug will be closed when the change is moved to the nightly branch (called mozilla-central)

Now the patch is on the integration branch, autoland (https://treeherder.mozilla.org/#/jobs?repo=autoland). About twice a day the integration branch is merged into the main branch, mozilla-central (https://treeherder.mozilla.org/jobs?repo=mozilla-central).
So, if this doesn't cause unexpected test failures (it shouldn't), shortly it will be merged and automatically resolved.
You don't have to do anything since it's all automated.

Thanks a lot to both of you for the explanation. Looking forward to contribute more to the project :)

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.