From 5873511f512850ccf74a293b8a6bb90bfb92a583 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Mon, 27 Aug 2007 00:45:56 +0000 Subject: [PATCH] make sure we Unix weenies get a newline at the end of the message instead of our shell prompt don't be overprotective of apr_ctime() by giving it more memory than it requires or nuking a newline which isn't there git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@569934 13f79535-47bb-0310-9956-ffa450edef68 --- server/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/main.c b/server/main.c index cd338e08c6..92d4b8143e 100644 --- a/server/main.c +++ b/server/main.c @@ -283,6 +283,7 @@ static process_rec *init_process(int *argc, const char * const * *argv) apr_pool_t *cntx; apr_status_t stat; const char *failed = "apr_app_initialize()"; + stat = apr_app_initialize(argc, argv, NULL); if (stat == APR_SUCCESS) { failed = "apr_pool_create()"; @@ -299,11 +300,10 @@ static process_rec *init_process(int *argc, const char * const * *argv) * (if they relied on global pools or mutexes, for example) then * the datestamp logic will need to be replaced. */ - char ctimebuff[APR_CTIME_LEN + 1]; + char ctimebuff[APR_CTIME_LEN]; apr_ctime(ctimebuff, apr_time_now()); - ctimebuff[APR_CTIME_LEN] = '\0'; fprintf(stderr, "[%s] [crit] (%d) %s: %s failed " - "to initial context, exiting", + "to initial context, exiting\n", ctimebuff, stat, (*argv)[0], failed); apr_terminate(); exit(1); -- 2.40.0