mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +00:00
2000-11-13 Roland McGrath <roland@frob.com>
* hurd/get-host.c (_hurd_get_host_config): Fix last change.
This commit is contained in:
parent
fbfdeab348
commit
8c65460904
@ -72,7 +72,7 @@ _hurd_get_host_config (const char *item, char *buf, size_t buflen)
|
||||
}
|
||||
|
||||
/* Remove newlines in case someone wrote the file by hand. */
|
||||
while (buf[nread - 1] == '\n' && nread > 0)
|
||||
while (nread > 0 && buf[nread - 1] == '\n')
|
||||
buf[--nread] = '\0';
|
||||
|
||||
/* Null-terminate the result if there is enough space. */
|
||||
|
Loading…
Reference in New Issue
Block a user