Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cf-agent/verify_files_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1672,8 +1672,8 @@ bool CopyRegularFile(EvalContext *ctx, const char *source, const char *dest, con
if (attr->copy.backup == BACKUP_OPTION_TIMESTAMP)
{
stampnow = time((time_t *) NULL);
snprintf(stamp, CF_BUFSIZE - 1, "_%lu_%s",
CFSTARTTIME, CanonifyName(ctime(&stampnow)));
snprintf(stamp, CF_BUFSIZE - 1, "_%jd_%s",
(intmax_t) CFSTARTTIME, CanonifyName(ctime(&stampnow)));

if (!JoinSuffix(backup, sizeof(backup), stamp))
{
Expand Down
6 changes: 4 additions & 2 deletions libpromises/evalfunction.c
Original file line number Diff line number Diff line change
Expand Up @@ -7576,6 +7576,8 @@ static FnCallResult FnCallStrftime(ARG_UNUSED EvalContext *ctx,
const FnCall *fp,
const Rlist *finalargs)
{
assert(fp != NULL);

/* begin fn-specific content */

char *mode = RlistScalarValue(finalargs);
Expand All @@ -7599,8 +7601,8 @@ static FnCallResult FnCallStrftime(ARG_UNUSED EvalContext *ctx,
if (tm_pointer == NULL)
{
Log(LOG_LEVEL_WARNING,
"Function %s, the given time stamp '%ld' was invalid. (strftime: %s)",
fp->name, when, GetErrorStr());
"Function %s, the given time stamp '%jd' was invalid. (strftime: %s)",
fp->name, (intmax_t) when, GetErrorStr());
}
else if (PortablyFormatTime(buffer, sizeof(buffer),
format_string, when, tm_pointer))
Expand Down
2 changes: 1 addition & 1 deletion libpromises/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ static bool NoOrObsoleteLock(LockData *entry, ARG_UNUSED size_t entry_size, size
time_t now = time(NULL);
if ((now - entry->time) <= (time_t) *max_old)
{
Log(LOG_LEVEL_DEBUG, "Giving time to process '%d' (holding lock for %ld s)", entry->pid, (now - entry->time));
Log(LOG_LEVEL_DEBUG, "Giving time to process '%d' (holding lock for %jd s)", entry->pid, (intmax_t) (now - entry->time));
}
return ((now - entry->time) > (time_t) *max_old);
}
Expand Down
2 changes: 1 addition & 1 deletion libpromises/processes_select.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ static void MaybeFixStartTime(const char *line,
fields[j], ctime(&value));

free(fields[j]);
xasprintf(fields + j, "%ld", value);
xasprintf(fields + j, "%jd", (intmax_t) value);
}
}
else if (fields[k])
Expand Down
Loading