cr-dump: getpriority() can return a negative value
Since getpriority() can legitimately return the value -1, it is necessary to clear the external variable errno prior to the call, then check it afterward to determine if -1 is an error or a legitimate value. Cc: Filipe Brandenburger <filbranden@google.com> Fixes: 16e673c2f6a0 ("cr-check: Inspect errno on syscall failures") Signed-off-by:Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment