You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Bannier <be...@mesosphere.io> on 2019/03/03 01:01:25 UTC

Review Request 70088: Initialized pointers with `nullptr` instead of `0`.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70088/
-----------------------------------------------------------

Review request for mesos and James Peach.


Repository: mesos


Description
-------

Initialized pointers with `nullptr` instead of `0`.


Diffs
-----

  src/linux/ns.cpp 4d163818192d8638b9beadbae3250755c5d9fecf 


Diff: https://reviews.apache.org/r/70088/diff/1/


Testing
-------

`make check`


Thanks,

Benjamin Bannier


Re: Review Request 70088: Initialized pointers with `nullptr` instead of `0`.

Posted by Benjamin Bannier <be...@mesosphere.io>.

> On March 3, 2019, 3:36 a.m., James Peach wrote:
> > I'm not sure that `nullptr` makes any difference here. Both structs contain both pointer and integer types, so while `0` is ok, I guess `nullptr` does the job too :)

Thanks for the review!

The motivation for this patch was enabling the more powerful `modernize-use-nullptr` linter from clang-tidy instead of our homegrown cpplint patch, https://reviews.apache.org/r/70102/. That shouldn't just give us a better linter (e.g., one which can detect that `0` is a pointer value), but also reduce our diff against upstream cpplint.


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70088/#review213358
-----------------------------------------------------------


On March 3, 2019, 2:01 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70088/
> -----------------------------------------------------------
> 
> (Updated March 3, 2019, 2:01 a.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Initialized pointers with `nullptr` instead of `0`.
> 
> 
> Diffs
> -----
> 
>   src/linux/ns.cpp 4d163818192d8638b9beadbae3250755c5d9fecf 
> 
> 
> Diff: https://reviews.apache.org/r/70088/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Re: Review Request 70088: Initialized pointers with `nullptr` instead of `0`.

Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70088/#review213358
-----------------------------------------------------------


Ship it!




I'm not sure that `nullptr` makes any difference here. Both structs contain both pointer and integer types, so while `0` is ok, I guess `nullptr` does the job too :)

- James Peach


On March 3, 2019, 1:01 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70088/
> -----------------------------------------------------------
> 
> (Updated March 3, 2019, 1:01 a.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Initialized pointers with `nullptr` instead of `0`.
> 
> 
> Diffs
> -----
> 
>   src/linux/ns.cpp 4d163818192d8638b9beadbae3250755c5d9fecf 
> 
> 
> Diff: https://reviews.apache.org/r/70088/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>