diff options
Diffstat (limited to 'usr.sbin/httpd/src/support/logresolve.c')
| -rw-r--r-- | usr.sbin/httpd/src/support/logresolve.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/usr.sbin/httpd/src/support/logresolve.c b/usr.sbin/httpd/src/support/logresolve.c index 9223043494d..df940d75d65 100644 --- a/usr.sbin/httpd/src/support/logresolve.c +++ b/usr.sbin/httpd/src/support/logresolve.c @@ -244,13 +244,9 @@ static void stats (FILE *output) static int getline (char *s, int n) { - char *cp; - if (!fgets(s, n, stdin)) return (0); - cp = strchr(s, '\n'); - if (cp) - *cp = '\0'; + s[strcspn(s, "\n")] = '\0'; return (1); } |
