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
16 changes: 8 additions & 8 deletions client-src/amandates.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ enter_record(
if (level < 0 || level >= DUMP_LEVELS) {
qname = quote_string(name);
/* this is not allowed, but we can ignore it */
dbprintf(_("amandates botch: %s lev %d: new dumpdate %ld\n"),
qname, level, (long) dumpdate);
dbprintf(_("amandates botch: %s lev %d: new dumpdate %lld\n"),
qname, level, (long long) dumpdate);
amfree(qname);
return;
} else if(dumpdate < amdp->dates[level]) {
qname = quote_string(name);
/* this is not allowed, but we can ignore it */
dbprintf(_("amandates botch: %s lev %d: new dumpdate %ld old %ld\n"),
qname, level, (long) dumpdate, (long) amdp->dates[level]);
dbprintf(_("amandates botch: %s lev %d: new dumpdate %lld old %lld\n"),
qname, level, (long long) dumpdate, (long long) amdp->dates[level]);
amfree(qname);
return;
}
Expand All @@ -298,15 +298,15 @@ amandates_updateone(
if (level < 0 || level >= DUMP_LEVELS) {
/* this is not allowed, but we can ignore it */
qname = quote_string(name);
dbprintf(_("amandates updateone: %s lev %d: bad level, dumpdate %ld"),
name, level, (long) dumpdate);
dbprintf(_("amandates updateone: %s lev %d: bad level, dumpdate %lld"),
name, level, (long long) dumpdate);
amfree(qname);
return;
} else if (dumpdate < amdp->dates[level]) {
/* this is not allowed, but we can ignore it */
qname = quote_string(name);
dbprintf(_("amandates updateone: %s lev %d: new dumpdate %ld old %ld"),
name, level, (long) dumpdate, (long) amdp->dates[level]);
dbprintf(_("amandates updateone: %s lev %d: new dumpdate %lld old %lld"),
name, level, (long long) dumpdate, (long long) amdp->dates[level]);
amfree(qname);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions client-src/client_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ run_calcsize(
pid_t calcpid;
times_t start_time;
FILE *dumpout = NULL;
int dumpsince;
time_t dumpsince;
char *errmsg = NULL;
char *line = NULL;
amwait_t wait_status;
Expand Down Expand Up @@ -1454,7 +1454,7 @@ run_calcsize(
}
g_snprintf(number, sizeof(number), "%d", level);
g_ptr_array_add(argv_ptr, g_strdup(number));
g_snprintf(number, sizeof(number), "%d", dumpsince);
g_snprintf(number, sizeof(number), "%lld", (long long)dumpsince);
g_ptr_array_add(argv_ptr, g_strdup(number));
}

Expand Down
2 changes: 1 addition & 1 deletion client-src/sendsize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ generic_calc_estimates(
g_ptr_array_add(argv_ptr, g_strdup(number));
dbprintf(" %s", number);
g_snprintf(number, sizeof(number),
"%ld", (long)est->est[level].dumpsince);
"%lld", (long long)est->est[level].dumpsince);
g_ptr_array_add(argv_ptr, g_strdup(number));
dbprintf(" %s", number);
}
Expand Down
2 changes: 1 addition & 1 deletion common-src/shm-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ cleanup_shm_ring(void)

r = glob("AMANDA_GLOB", GLOB_NOSORT, NULL, &globbuf);
if (r == 0) {
int one_day_old = time(NULL) - 60*60*24;
time_t one_day_old = time(NULL) - 60*60*24;
for (aglob = globbuf.gl_pathv; *aglob != NULL; aglob++) {
if (!g_hash_table_lookup(names, *aglob)) {
struct stat statbuf;
Expand Down
2 changes: 1 addition & 1 deletion device-src/s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ rfc3339_date(
waitpid(pid, NULL, 0);
break;
}
return atoi(buf);
return atoll(buf);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions ndmp-src/ndma_cops_backreco.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ ndmca_monitor_recover (struct ndm_session *sess)
ndmp9_data_state ds;
ndmp9_mover_state ms;
char *estb;
int last_state_print = 0;
time_t last_state_print = 0;

if (ca->job.tape_tcp) {
return (ndmca_monitor_recover_tape_tcp(sess));
Expand Down Expand Up @@ -578,7 +578,7 @@ ndmca_monitor_recover_tape_tcp (struct ndm_session *sess)
int count;
ndmp9_data_state ds;
char *estb;
int last_state_print = 0;
time_t last_state_print = 0;

ndmalogf (sess, 0, 3, "Monitoring recover");

Expand Down Expand Up @@ -1060,7 +1060,7 @@ ndmca_mon_wait_for_something (struct ndm_session *sess, int max_delay_secs)
{
struct ndm_control_agent *ca = &sess->control_acb;
int delta, notices;
int time_ref = time(0) + max_delay_secs;
time_t time_ref = time(0) + max_delay_secs;

ndmalogf (sess, 0, 5, "mon_wait_for_something() entered");

Expand Down