mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 09:39:13 +00:00
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: alex vk <avankemp@gmail.com> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
871d21807b
commit
bd057dc3ad
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ extern int do_open_proc(pid_t pid, int flags, const char *fmt, ...);
|
|||
({ \
|
||||
int __fd = do_open_proc(pid, flags, \
|
||||
fmt, ##__VA_ARGS__); \
|
||||
if (__fd < 0 && (errno != ier)) \
|
||||
if (__fd < 0 && (errno != (ier))) \
|
||||
pr_perror("Can't open %d/" fmt " on procfs", \
|
||||
pid, ##__VA_ARGS__); \
|
||||
\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue