chiark / gitweb /
sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane...
authorFranck Bui <fbui@suse.com>
Wed, 18 Apr 2018 16:32:21 +0000 (18:32 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commit716268fa6f3b5d2d385c6efd969fa209125f256c
tree1f8c4a4a6ca2d3245e806da24b721491d38a474a
parent16e69d6d425ae58ef5760e5d575bad7d9239b3da
sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane() wrappers (#8737)

To indicate that the there're no more entries, these wrappers return false but
did leave the passed pointed unmodified.

However EOF is not an error and is a very common case so initialize the output
argument to NULL even in this case so callers don't need to do that.

Fixes: #8721
src/basic/user-util.c