diff --git a/src/kauth/rebuild.c b/src/kauth/rebuild.c index 86241b16dc..2d636893b1 100644 --- a/src/kauth/rebuild.c +++ b/src/kauth/rebuild.c @@ -123,6 +123,7 @@ PrintEntry(index, entry) int i; char Time[100]; struct tm *tm_p; + time_t tt; printf("\n"); @@ -171,7 +172,8 @@ PrintEntry(index, entry) if (entry->flags & KAFOLDKEYS) return; - tm_p = localtime((time_t *) & entry->user_expiration); + tt = entry->user_expiration; + tm_p = localtime(&tt); if (tm_p) strftime(Time, 100, "%m/%d/%Y %H:%M", tm_p); @@ -285,8 +287,8 @@ RebuildEntry(entryp) if (strcmp(flags, "") != 0) fprintf(out, " -flags %s", &flags[1]); if (entryp->user_expiration != 0xffffffff) { - strftime(Time, 50, "%m/%d/%Y %H:%M", - localtime((time_t *) & entryp->user_expiration)); + time_t tt = entryp->user_expiration; + strftime(Time, 50, "%m/%d/%Y %H:%M",localtime(&tt)); fprintf(out, " -expiration '%s'", Time); } fprintf(out, " -lifetime %u", entryp->max_ticket_lifetime); diff --git a/src/lwp/test/selsubs.c b/src/lwp/test/selsubs.c index f32e812250..d318fa0bda 100644 --- a/src/lwp/test/selsubs.c +++ b/src/lwp/test/selsubs.c @@ -150,6 +150,7 @@ Log(char *fmt, ...) struct timeval now; struct timezone tz; struct tm *ltime; + time_t tt; int code; PROCESS pid; extern char *program; @@ -157,7 +158,8 @@ Log(char *fmt, ...) code = gettimeofday(&now, &tz); assert(code == 0); - ltime = localtime((time_t *) & now.tv_sec); + tt = now.tv_sec; + ltime = localtime(&tt); LWP_CurrentProcess(&pid); fprintf(stderr, "%s 0x%x %02d:%02d:%02d.%d: ", program ? program : "",