From f049fbb206ce4c9bbdc9f15473250f62110e3e0e Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 29 Mar 2008 12:11:44 +0000 Subject: [PATCH] avoid system call when not needed (ITS#5441) --- servers/slapd/overlays/auditlog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/slapd/overlays/auditlog.c b/servers/slapd/overlays/auditlog.c index 55aabd40af..7d7b82a8f6 100644 --- a/servers/slapd/overlays/auditlog.c +++ b/servers/slapd/overlays/auditlog.c @@ -74,7 +74,7 @@ static int auditlog_response(Operation *op, SlapReply *rs) { Modifications *m; struct berval *b, *who = NULL; char *what, *suffix; - long stamp = slap_get_time(); + time_t stamp; int i; if ( rs->sr_err != LDAP_SUCCESS ) return SLAP_CB_CONTINUE; @@ -125,6 +125,7 @@ static int auditlog_response(Operation *op, SlapReply *rs) { return SLAP_CB_CONTINUE; } + stamp = slap_get_time(); fprintf(f, "# %s %ld %s%s%s\n", what, stamp, suffix, who ? " " : "", who ? who->bv_val : ""); -- 2.39.5