Skip to content
Commit bd057dc3 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov
Browse files

util: add parameter parenthesis to __open_proc statement in expr



Fixes small bug:
__open_proc() macro is called from parse_pid_loginuid as:
>	fd = __open_proc(pid, (ignore_noent) ? ENOENT : 0,
>			O_RDONLY, "loginuid");

So, ier parameter is badly expanded with current version:
>	if (__fd < 0 && (errno != (ignore_noent) ? ENOENT : 0)

Which in result does not hide "No such file" error on feature
test (at least with arm-gcc). Not a big deal, tho.

Reported-by: default avataralex vk <avankemp@gmail.com>
Signed-off-by: default avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 871d2180
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment