]> git.kaiwu.me - haproxy.git/commit
MEDIUM: tools: read_line_to_trash() handle empty files without \n
authorMia Kanashi <chad@redpilled.dev>
Wed, 6 May 2026 21:17:39 +0000 (00:17 +0300)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 7 May 2026 13:19:15 +0000 (15:19 +0200)
commit83e6ae3334cbab6761b9c6c425b16db1e86d028a
tree3eb51e361693b4f824da4b15c4601433eced06f6
parentfaf3e9ac3a5df7258b0abbc06b0e0378617a18e5
MEDIUM: tools: read_line_to_trash() handle empty files without \n

fgets() returns NULL when EOF is reached before newline, handle
that as a success for consistency, current behaviour is arguably a bug,
the API of fgets() is pretty weird after all so someone probably forgot.
src/tools.c