mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-04-27 18:30:49 +02:00
fgetln: Fix coding style
This commit is contained in:
parent
47109e39d5
commit
fafffd1f7e
@ -34,15 +34,15 @@
|
|||||||
char *
|
char *
|
||||||
fgetln (FILE *stream, size_t *len)
|
fgetln (FILE *stream, size_t *len)
|
||||||
{
|
{
|
||||||
char *line=NULL;
|
char *line = NULL;
|
||||||
ssize_t nread;
|
ssize_t nread;
|
||||||
|
|
||||||
nread = getline (&line, len, stream);
|
nread = getline (&line, len, stream);
|
||||||
if (nread == -1)
|
if (nread == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
(*len)--; /* get rid of the trailing \0, fgetln
|
/* Get rid of the trailing \0, fgetln does not have it. */
|
||||||
does not have it */
|
(*len)--;
|
||||||
|
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user