Closed Bug 1626769 Opened 4 years ago Closed 4 years ago

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

Categories

(Developer Infrastructure :: Source Code Analysis, task)

task
Not set
minor

Tracking

(firefox77 fixed)

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: Sylvestre, Assigned: morganeckenroth, Mentored)

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.

      return BigInt::parseLiteralDigits(cx, Range<const CharT>(start, end), 10,
                                        isNegative, haveParseError);
    } else if (start[0] == '-') {
      bool isNegative = true;

do not use 'else' after 'return'

https://searchfox.org/mozilla-central/source/js/src/vm/BigIntType.cpp#3530-3534

As the change is pretty easy, it is mostly 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/tools/docs/contribute/how_to_contribute_firefox.html

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

Assignee: nobody → morganeckenroth
Status: NEW → ASSIGNED

Hello, I am new to the Firefox software ecosystem, but have extensive experience with low-level embedded software development. I saw this bug and though it a good fit to get started learning the coded review and submission process. Please let me know if there is anything, or anyone, that I should add to the code patch that I submitted. Thank you in advance, and I am excited to start contributing! -Morgan

Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b7b063fef238
Removed "else after return" code flow. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: