Re: [PATCH iproute2 1/2] lib/fs: avoid double call to mkdir on make_path()

2020-12-18 Thread Phil Sutter
Hi Andrea, On Fri, Dec 18, 2020 at 08:09:22PM +0100, Andrea Claudi wrote: > make_path() function calls mkdir two times in a row. The first one it > stores mkdir return code, and then it calls it again to check for errno. To me it rather seems like I rebased the original commit into a mess. Or I g

[PATCH iproute2 1/2] lib/fs: avoid double call to mkdir on make_path()

2020-12-18 Thread Andrea Claudi
make_path() function calls mkdir two times in a row. The first one it stores mkdir return code, and then it calls it again to check for errno. This seems unnecessary, as we can use the return code from the first call and check for errno if not 0. Signed-off-by: Andrea Claudi --- lib/fs.c | 2 +-