Re: [PATCH] userns: simplify map_id_range_* functions

2015-07-27 Thread Eric W. Biederman
Nicolas Iooss writes: > On 07/27/2015 12:29 PM, Eric W. Biederman wrote: >> Nicolas Iooss writes: >> >>> Functions map_id_range_down, map_id_down and map_id_up all used the >>> construction: >>> >>> if (...) >>> id = ... >>> else >>> id = ... >>> return id; >>> >>> w

Re: [PATCH] userns: simplify map_id_range_* functions

2015-07-27 Thread Nicolas Iooss
On 07/27/2015 12:29 PM, Eric W. Biederman wrote: > Nicolas Iooss writes: > >> Functions map_id_range_down, map_id_down and map_id_up all used the >> construction: >> >> if (...) >> id = ... >> else >> id = ... >> return id; >> >> which can be simplified by directly ret

Re: [PATCH] userns: simplify map_id_range_* functions

2015-07-26 Thread Eric W. Biederman
Nicolas Iooss writes: > Functions map_id_range_down, map_id_down and map_id_up all used the > construction: > > if (...) > id = ... > else > id = ... > return id; > > which can be simplified by directly returning the result of the > computations in each branch. > > Mor

[PATCH] userns: simplify map_id_range_* functions

2015-07-25 Thread Nicolas Iooss
Functions map_id_range_down, map_id_down and map_id_up all used the construction: if (...) id = ... else id = ... return id; which can be simplified by directly returning the result of the computations in each branch. Moreover as the condition tested whether the "brea