]> git.ipfire.org Git - thirdparty/systemd.git/commit
util: minor cleanups for loop_read() and friends
authorLennart Poettering <lennart@poettering.net>
Fri, 18 Sep 2015 22:47:08 +0000 (00:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 Sep 2015 14:30:51 +0000 (16:30 +0200)
commit4fdae6c8479f6c1a256bc95099cae2fdc23e9256
tree5698cab1dbf361ad17f6eae065bb8092bc14358e
parent1fc464f6fbecfc5d8ba9f7b98d19e21fb324bfb9
util: minor cleanups for loop_read() and friends

When 0 bytes are to be written, make sure to go into read() at least
once, in order to validate the parameters, such as the passed fd.

Return error on huge values, add a couple of asserts and casts where
appropriate.
src/basic/util.c