diff options
author | Brian Pane <brianp@apache.org> | 2005-07-03 21:21:46 +0000 |
---|---|---|
committer | Brian Pane <brianp@apache.org> | 2005-07-03 21:21:46 +0000 |
commit | 34e82d6a25b84975908885129f4c7ec2f5e25611 (patch) | |
tree | 3ff7ad0fdd72f6cb03fd5ab45f4408060759d201 /modules/loggers | |
parent | 27b516b966754da99654b6065092a05785821634 (diff) | |
download | httpd-34e82d6a25b84975908885129f4c7ec2f5e25611.tar.gz |
use struct assignment instead of memcpy so the compiler can decide whether to inline the copy loop or call memcpy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@208972 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/loggers')
-rw-r--r-- | modules/loggers/mod_log_config.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 1845999e33..b8900683e6 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -579,7 +579,7 @@ static const char *log_request_time(request_rec *r, char *a) #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 @@ static const char *log_request_time(request_rec *r, char *a) 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; } |