]> git.ipfire.org Git - thirdparty/systemd.git/commit
rlimit-util: tweak setrlimit_closest() a bit
authorLennart Poettering <lennart@poettering.net>
Mon, 7 May 2018 15:56:06 +0000 (17:56 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 17 May 2018 18:40:04 +0000 (20:40 +0200)
commit114c55f2d52808c8c3027d3cf4f7e3453f0a28d6
tree8502d6eddb1cbc74b822c55305b354403502b3d2
parent37bc14de5bd74a056d55ec14f63dc9ec999e974e
rlimit-util: tweak setrlimit_closest() a bit

POSIX doesn't declare too clearly how RLIM_INFINITY is set. Let's hence
filter it out explicitly early on, just as safety precaution should it
be defined weirdly on some arch, for example negative or below the
maximum value of the rlim_t type.
src/basic/rlimit-util.c