Adjust read count so that a newline can be added afterwards

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
This commit is contained in:
Erik Sjölund 2019-08-11 16:44:26 +02:00
parent 3bc861cb11
commit 39ce3626e0
No known key found for this signature in database
GPG Key ID: 3CA6EA08BF9B5AB0
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ static void __attribute__((constructor)) init()
return;
}
r = TEMP_FAILURE_RETRY (read (fd, buf, sizeof (buf)));
r = TEMP_FAILURE_RETRY (read (fd, buf, sizeof (buf) - 1));
close (fd);
if (r < 0)
{