chiark / gitweb /
util: minor cleanups for loop_read() and friends
authorLennart Poettering <lennart@poettering.net>
Fri, 18 Sep 2015 22:47:08 +0000 (00:47 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 29 Mar 2017 08:45:09 +0000 (10:45 +0200)
commita28c2a18b536be662e4e5cbae6ded84a8866d9fd
tree1414b3220a17d177662fc018a2990b5a9103b1b1
parentad183b555168c578293fa66c2ecaf83d104e9caa
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