mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 54304: Added explicit break statements in switch.
Date Fri, 02 Dec 2016 20:38:11 GMT

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




3rdparty/libprocess/include/process/address.hpp (lines 358 - 371)
<https://reviews.apache.org/r/54304/#comment228418>

    Is it possible to do something more like:
    
    ```
     {
       switch (address.family()) {
         case Address::Family::INET: {
           return stream << inet::Address(address.sockaddr.in);
         }
     #ifndef __WINDOWS__
         case Address::Family::UNIX: {
          return stream << unix::Address(address.sockaddr.un);
         }
     #endif // __WINDOWS__
       }
     }
    ```


- Benjamin Mahler


On Dec. 2, 2016, 10:48 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54304/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2016, 10:48 a.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The expectation here was that only one case would match so no
> intentional fall-through would happen. Make this explicit by adding
> break statements.
> 
> This was noted by coverity in CID 1396669.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/address.hpp 01bc065b45ff1a4c38f245b49078cc06dbb11249

> 
> Diff: https://reviews.apache.org/r/54304/diff/
> 
> 
> Testing
> -------
> 
> `make check` (OS X).
> 
> This is not expected to be a functional change.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message