You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by br...@apache.org on 2005/07/03 23:21:47 UTC

svn commit: r208972 - /httpd/httpd/trunk/modules/loggers/mod_log_config.c

Author: brianp
Date: Sun Jul  3 14:21:46 2005
New Revision: 208972

URL: http://svn.apache.org/viewcvs?rev=208972&view=rev
Log:
use struct assignment instead of memcpy so the compiler can decide whether to inline the copy loop or call memcpy

Modified:
    httpd/httpd/trunk/modules/loggers/mod_log_config.c

Modified: httpd/httpd/trunk/modules/loggers/mod_log_config.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/loggers/mod_log_config.c?rev=208972&r1=208971&r2=208972&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/trunk/modules/loggers/mod_log_config.c Sun Jul  3 14:21:46 2005
@@ -579,7 +579,7 @@
 #endif
         unsigned t_seconds = (unsigned)apr_time_sec(request_time);
         unsigned i = t_seconds & TIME_CACHE_MASK;
-        memcpy(cached_time, &(request_time_cache[i]), sizeof(*cached_time));
+        *cached_time = request_time_cache[i];
         if ((t_seconds != cached_time->t) ||
             (t_seconds != cached_time->t_validate)) {
 
@@ -605,8 +605,7 @@
                          xt.tm_year+1900, xt.tm_hour, xt.tm_min, xt.tm_sec,
                          sign, timz / (60*60), (timz % (60*60)) / 60);
             cached_time->t_validate = t_seconds;
-            memcpy(&(request_time_cache[i]), cached_time,
-                   sizeof(*cached_time));
+            request_time_cache[i] = *cached_time;
         }
         return cached_time->timestr;
     }