]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/device: avoid bogus errno use and invert ratelimit_test()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 24 Apr 2018 11:50:46 +0000 (13:50 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 24 Apr 2018 12:10:27 +0000 (14:10 +0200)
commita1bcaa075bba1139378d745569c99b985892f6ca
treeb7be40702d0a46dd3c9b35c5115144c185b80241
parentbb1d9534ae7cad8246037aa7fbbfbd7116896f3c
core/device: avoid bogus errno use and invert ratelimit_test()

I'm not sure if I understand the original code. AFAICS, errno does not
have to be set at all in this callback.

ratelimit_test() returns positive if we are under limit. The code would only
log if the condition happened very often, which I assume is not inteded, and
this check was supposed to prevent too much logging.
src/core/device.c