> On March 10, 2016, 9:45 a.m., Adam B wrote:
> > src/tests/mesos.cpp, lines 182-184
> > <https://reviews.apache.org/r/44515/diff/2/?file=1293632#file1293632line182>
> >
> >     Any reason you can't reuse the previous `path` and `fd` variables?
> 
> Greg Mann wrote:
>     We could do that; reusing the variables does improve efficiency, but also 
> reduces readability. Especially in tests, I would consider readability to be 
> the priority, so I decided to declare new variables for these. I've received 
> feedback in the past to declare new variables in similar situations, but I 
> would be interested to hear if you prefer reuse here.

I concur with you Gregg, however I think probably `path` and `fd` should change 
(not on this review though). Another option would be to separate logical blocks 
into their own scopes, or a third one, is to have each logical block into a 
different function. Though for this short method I would go for the scopes 
solution.


- Alexander


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


On March 10, 2016, 11:16 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44515/
> -----------------------------------------------------------
> 
> (Updated March 10, 2016, 11:16 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Till 
> Toenshoff.
> 
> 
> Bugs: MESOS-4849
>     https://issues.apache.org/jira/browse/MESOS-4849
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added agent flags for HTTP authentication.
> 
> Three command-line flags have been added to the agent to enable HTTP 
> authentication: `--authenticate_http`, `--http_credentials`, and 
> `--http_authenticators`.
> 
> 
> Diffs
> -----
> 
>   src/slave/constants.hpp bcbb1401aa8f9f04c4f9256bb4f560e18d8994e0 
>   src/slave/constants.cpp 0f0d8e4b079d136d250f83cfc768de8c98b8bee2 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp eb470154f30634b3db439be1c122ff93d3147afe 
>   src/slave/slave.cpp 840534ff0687e82ed063c386e36bbabada230697 
>   src/tests/mesos.cpp 577072136415191334c74b69a1c0b7eed8e77e8b 
> 
> Diff: https://reviews.apache.org/r/44515/diff/
> 
> 
> Testing
> -------
> 
> `sudo make check` was used to test on both OSX and Ubuntu 14.04.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>

Reply via email to