mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
another-time_t-pointer-fix-20060320
do not pass in pointers to 32-bit values as pointers to 64-bit values
This commit is contained in:
parent
1b2fbe5fa9
commit
e6f0c0c68f
@ -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);
|
||||
|
@ -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 : "",
|
||||
|
Loading…
Reference in New Issue
Block a user