Skip to content

Commit

Permalink
Fix a few more invalid assumptions about time_t (which != unsigned long)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnoKing committed Dec 15, 2024
1 parent 8cecee5 commit 119e72c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cmd/INIT/mamake.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ static void report(int level, char *text, char *item, Rule_t *r)
fprintf(stderr, "%s", text);
if (r && r->time && state.debug <= -2)
#if __STDC_VERSION__ >= 199901L
fprintf(stderr, " %lld", (long long)r->time);
fprintf(stderr, " %llu", (unsigned long long)r->time);
#else
fprintf(stderr, " %lu", (unsigned long)r->time);
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/ksh93/edit/history.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,9 @@ static ssize_t hist_write(Sfio_t *iop,const void *buff,size_t insize,Sfdisc_t* h
if(hp->auditfp)
{
time_t t=time(NULL);
sfprintf(hp->auditfp, "%u;%lu;%s;%*s%c",
sfprintf(hp->auditfp, "%u;%llu;%s;%*s%c",
sh_isoption(SH_PRIVILEGED) ? sh.euserid : sh.userid,
(unsigned long)t, hp->tty, size, buff, 0);
(unsigned long long)t, hp->tty, size, buff, 0);
sfsync(hp->auditfp);
}
#endif /* SHOPT_AUDIT */
Expand Down

0 comments on commit 119e72c

Please sign in to comment.