From: William A. Rowe Jr Date: Mon, 27 Aug 2007 01:05:52 +0000 (+0000) Subject: Thanks to Jeff, identify a wasted byte and ensure this message X-Git-Tag: 2.2.6~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=075e59932584a43bc292e473ffd7513727f25ab4;p=thirdparty%2Fapache%2Fhttpd.git Thanks to Jeff, identify a wasted byte and ensure this message is the final word (as in end-of-the-line final word). Backport: r569934 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@569941 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index bed6238a914..2dcaa43ca19 100644 --- a/CHANGES +++ b/CHANGES @@ -28,7 +28,7 @@ Changes with Apache 2.2.6 *) main core: Emit errors during the initial apr_app_initialize() or apr_pool_create() (when apr-based error reporting is not ready). - [William Rowe] + [William Rowe, Jeff Trawick] *) log core: fix the new piped logger case where we couldn't connect the replacement stderr logger's stderr to the NULL stdout stream. diff --git a/server/main.c b/server/main.c index f41fcb9baaf..22c0b68369c 100644 --- a/server/main.c +++ b/server/main.c @@ -268,6 +268,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()"; @@ -279,11 +280,10 @@ static process_rec *init_process(int *argc, const char * const * *argv) * but APR doesn't exist yet, we can't use it for reporting * these earliest two failures; */ - 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);