]> git.ipfire.org Git - thirdparty/libbsd.git/commit
Change fgetln to return the correct length value
authorGuillem Jover <guillem@hadrons.org>
Fri, 15 May 2009 19:23:03 +0000 (21:23 +0200)
committerGuillem Jover <guillem@hadrons.org>
Fri, 15 May 2009 19:23:03 +0000 (21:23 +0200)
commitdeb9f56ceb560f96448ff9bfa1befdf7ed9849de
tree1d19276539c75801de99280a4319621ab62fce0f
parentaefc6f441aa1ae51135fea33d25572e39222cce7
Change fgetln to return the correct length value

Set len to 0 on error conditions to mimmic FreeBSD behaviour, and return
the amount of read characters on success, instead of the allocated size
by getline.

Reported-by: Jief L. <jief1.l@gmail.com>
src/fgetln.c