From ba712ace59d5de5806f8d93c789108f76d8c19ed Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Wed, 10 Oct 2001 13:02:22 +0000 Subject: [PATCH] Too many args is a bad thing too, some days git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91398 13f79535-47bb-0310-9956-ffa450edef68 --- support/rotatelogs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/rotatelogs.c b/support/rotatelogs.c index 6c674f8f7f..5c407c3013 100644 --- a/support/rotatelogs.c +++ b/support/rotatelogs.c @@ -107,7 +107,7 @@ int main (int argc, char *argv[]) atexit(apr_terminate); apr_pool_create(&pool, NULL); - if (argc < 3) { + if (argc < 3 || argc > 4) { fprintf(stderr, "Usage: %s " "[offset minutes from UTC]\n\n", @@ -140,7 +140,7 @@ int main (int argc, char *argv[]) exit(6); } - use_strftime = (strstr(szLogRoot, "%") != NULL); + use_strftime = (strchr(szLogRoot, '%') != NULL); if (apr_file_open_stdin(&f_stdin, pool) != APR_SUCCESS) { fprintf(stderr, "Unable to open stdin\n"); exit(1); -- 2.50.1