]> granicus.if.org Git - apache/commitdiff
make sure we Unix weenies get a newline at the end
authorJeff Trawick <trawick@apache.org>
Mon, 27 Aug 2007 00:45:56 +0000 (00:45 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 27 Aug 2007 00:45:56 +0000 (00:45 +0000)
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

index cd338e08c68661c0c3e4b6f5296ce1d505aaa918..92d4b8143ec85add1d43997bfce6f03b347270f7 100644 (file)
@@ -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);