Closed Bug 1737097 Opened 3 years ago Closed 3 years ago

transportlayerdtls.cpp: the 'empty' method should be used to check for emptiness instead of 'size'

Categories

(Developer Infrastructure :: Source Code Analysis, task)

Tracking

(firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: Sylvestre, Assigned: vishal.vikal.88, Mentored)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file, 1 obsolete file)

Filling as a good first bug to learn workflows.

MOZ_ASSERT(digests_.size() != 0);
should use .empty() instead

https://searchfox.org/mozilla-central/rev/489e82dcc1e5afbe691ff3b1c982382914637e38/dom/media/webrtc/transport/transportlayerdtls.cpp#1444

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-container-size-empty.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.

Depends on D129803

Assignee: nobody → vishal.vikal.88
Status: NEW → ASSIGNED

Need review

Flags: needinfo?(sledru)

Quick feedback: please be patient and ask politely ;)

Flags: needinfo?(sledru)

Sorry,

Attached file Bug 1737097 fix mistake r?Sylvestre (obsolete) (deleted) —

Depends on D129854

Please review my patch.
Thanks

Flags: needinfo?(sledru)
Attachment #9249216 - Attachment is obsolete: true
Attachment #9248296 - Attachment description: WIP: Bug 1737097 use .empty() :Sylvestre → Bug 1737097 - use .empty() instead of size() r=sylvestre
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/40f6400ae8b1 use .empty() instead of size() r=sylvestre
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Flags: needinfo?(sledru)
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: