Closed
Bug 1372853
Opened 7 years ago
Closed 7 years ago
Use nullptr in /netwerk (clang-tidy: modernize-use-nullptr)
Categories
(Core :: Networking, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: janx, Assigned: janx)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-active])
Attachments
(1 file, 1 obsolete file)
7.71 KB,
patch
|
janx
:
review+
|
Details | Diff | Splinter Review |
In /netwerk/ there are several opportunities to use `nullptr` instead of `0` or `NULL`. These can be automatically identified and acted on by the clang-tidy static analyzer (rule "modernize-use-nullptr").
Assignee | ||
Comment 1•7 years ago
|
||
This patch was generated with the following command: run-clang-tidy-4.0.py -p obj-x86_64-pc-linux-gnu/ -fix -checks=-*,modernize-use-nullptr netwerk/
Assignee | ||
Comment 2•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6e77935e3b1c
Assignee | ||
Updated•7 years ago
|
Summary: Use nullptr in netwerk (clang-tidy: modernize-use-nullptr) → Use nullptr in /netwerk (clang-tidy: modernize-use-nullptr)
Comment 3•7 years ago
|
||
If you're looking for a reviewer I volunteer as tribute :)
Whiteboard: [necko-active]
Assignee | ||
Comment 4•7 years ago
|
||
Comment on attachment 8877524 [details] [diff] [review] Use nullptr in /netwerk (clang-tidy: modernize-use-nullptr). r= (In reply to Valentin Gosu [:valentin] from comment #3) > If you're looking for a reviewer I volunteer as tribute :) Yes please! Thank you for volunteering :)
Attachment #8877524 -
Flags: review?(valentin.gosu)
Comment 5•7 years ago
|
||
Comment on attachment 8877524 [details] [diff] [review] Use nullptr in /netwerk (clang-tidy: modernize-use-nullptr). r= Review of attachment 8877524 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/protocol/http/nsHttpHandler.cpp @@ +1898,5 @@ > dec = q / (double) n; > count_n = 0; > p2 = q_Accept; > for (token = nsCRT::strtok(o_Accept, ",", &p); > + token != (char *) nullptr; nit: I think the cast isn't necessary here. @@ +1904,5 @@ > { > token = net_FindCharNotInSet(token, HTTP_LWS); > char* trim; > trim = net_FindCharInSet(token, ";" HTTP_LWS); > + if (trim != (char*)nullptr) // remove "; q=..." if present nit: cast isn't necessary
Attachment #8877524 -
Flags: review?(valentin.gosu) → review+
Assignee | ||
Comment 6•7 years ago
|
||
Thanks a lot Valentin! Nits addressed, still compiles without the unnecessary casts, r+ carried over.
Attachment #8878386 -
Flags: review+
Assignee | ||
Comment 7•7 years ago
|
||
Comment on attachment 8877524 [details] [diff] [review] Use nullptr in /netwerk (clang-tidy: modernize-use-nullptr). r= (I forgot to mark the old patch as obsolete)
Attachment #8877524 -
Attachment is obsolete: true
Assignee | ||
Comment 8•7 years ago
|
||
Previous try run still applies and is fully green, please land this patch.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/561c612879c4 Use nullptr in /netwerk (clang-tidy: modernize-use-nullptr). r=valentin
Keywords: checkin-needed
Comment 10•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/561c612879c4
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•