cast time_t to long long instead of long

This commit is contained in:
Thomas Bernard 2019-09-24 16:07:23 +02:00
parent 70a215d693
commit ace2250533
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
1 changed files with 4 additions and 4 deletions

View File

@ -74,8 +74,8 @@ int test(void)
int max_fd; int max_fd;
struct timeval timeout; struct timeval timeout;
struct timeval now; struct timeval now;
syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send=%ld.%06ld", syslog(LOG_DEBUG, "get_next_scheduled_send : %d next_send=%lld.%06ld",
i, (long)next_send.tv_sec, (long)next_send.tv_usec); i, (long long)next_send.tv_sec, (long)next_send.tv_usec);
FD_ZERO(&writefds); FD_ZERO(&writefds);
max_fd = 0; max_fd = 0;
gettimeofday(&now, NULL); gettimeofday(&now, NULL);
@ -100,8 +100,8 @@ int test(void)
} }
} }
syslog(LOG_DEBUG, "get_sendto_fds() returned %d", i); syslog(LOG_DEBUG, "get_sendto_fds() returned %d", i);
syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %ld.%06ld)", syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %lld.%06ld)",
max_fd, (long)timeout.tv_sec, (long)timeout.tv_usec); max_fd, (long long)timeout.tv_sec, (long)timeout.tv_usec);
i = select(max_fd, NULL, &writefds, NULL, &timeout); i = select(max_fd, NULL, &writefds, NULL, &timeout);
if(i < 0) { if(i < 0) {
syslog(LOG_ERR, "select: %m"); syslog(LOG_ERR, "select: %m");