printf("cmd: %s\n", e->cmd);
printflags(e->flags);
printf("delay: %d\n", e->delay);
- printf("next: %d = ", next);
+ printf("next: %ld = ", (long)next);
printf("%s", asctime(localtime(&next)));
}
*/
int matchday(entry *e, time_t time) {
struct tm current;
- int d;
localtime_r(&time, ¤t);
*/
time_t nextmatch(entry *e, time_t start) {
time_t time;
- time_t nexttime;
struct tm current;
- int res;
/* maximum match interval is 8 years (<102 months of 28 days):
* crontab has '* * 29 2 *' and we are on 1 March 2096:
char *pos;
int l = strlen(user);
- for (pos = list; pos = strstr(pos, user); pos += l) {
+ for (pos = list; (pos = strstr(pos, user)) != NULL; pos += l) {
if ((pos != list) && (*(pos - 1) != ','))
continue;
if ((pos[l] != '\0') && (pos[l] != ','))
}
else
if (verbose)
- printf("next of all jobs: %d = %s",
- next, asctime(localtime(&next)));
+ printf("next of all jobs: %ld = %s",
+ (long)next, asctime(localtime(&next)));
else
- printf("%d\n", next);
+ printf("%ld\n", (long)next);
return EXIT_SUCCESS;
}