Commit df985828 authored by Nick Mathewson's avatar Nick Mathewson
Browse files

Merge remote-tracking branch 'github/ticket26626'

parents fe8f7748 02a44425
o Code simplification and refactoring:
- Tor now assumes that you have standards-conformant stdint.h and
inttypes.h headers when compiling. Closes ticket 26626.
......@@ -1393,7 +1393,6 @@ AC_CHECK_HEADERS([errno.h \
netinet/in6.h \
pwd.h \
readpassphrase.h \
stdint.h \
stdatomic.h \
sys/eventfd.h \
sys/file.h \
......@@ -1517,22 +1516,6 @@ AC_CHECK_MEMBERS([struct timeval.tv_sec], , ,
#include <sys/time.h>
#endif])
dnl In case we aren't given a working stdint.h, we'll need to grow our own.
dnl Watch out.
AC_CHECK_SIZEOF(int8_t)
AC_CHECK_SIZEOF(int16_t)
AC_CHECK_SIZEOF(int32_t)
AC_CHECK_SIZEOF(int64_t)
AC_CHECK_SIZEOF(uint8_t)
AC_CHECK_SIZEOF(uint16_t)
AC_CHECK_SIZEOF(uint32_t)
AC_CHECK_SIZEOF(uint64_t)
AC_CHECK_SIZEOF(intptr_t)
AC_CHECK_SIZEOF(uintptr_t)
dnl AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, intptr_t, uintptr_t])
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
......
......@@ -35,8 +35,8 @@ typedef int pid_t;
#define PID_T_FORMAT "%d"
#elif (SIZEOF_PID_T == SIZEOF_LONG)
#define PID_T_FORMAT "%ld"
#elif (SIZEOF_PID_T == SIZEOF_INT64_T)
#define PID_T_FORMAT I64_FORMAT
#elif (SIZEOF_PID_T == 8)
#define PID_T_FORMAT "%"PRId64
#else
#error Unknown: SIZEOF_PID_T
#endif /* (0 == SIZEOF_PID_T) && defined(_WIN32) || ... */
......
......@@ -7,6 +7,7 @@
#define TOR_COMPAT_COMPILER_H
#include "orconfig.h"
#include <inttypes.h>
#if defined(__has_feature)
# if __has_feature(address_sanitizer)
......@@ -105,9 +106,6 @@
#endif /* !defined(HAVE_MACRO__func__) */
#endif /* defined(_MSC_VER) */
#define U64_TO_DBL(x) ((double) (x))
#define DBL_TO_U64(x) ((uint64_t) (x))
#ifdef ENUM_VALS_ARE_SIGNED
#define ENUM_BF(t) unsigned
#else
......@@ -183,54 +181,10 @@
#define OP_EQ ==
#define OP_NE !=
#ifdef _MSC_VER
/** Casts the uint64_t value in <b>a</b> to the right type for an argument
* to printf. */
#define U64_PRINTF_ARG(a) (a)
/** Casts the uint64_t* value in <b>a</b> to the right type for an argument
* to scanf. */
#define U64_SCANF_ARG(a) (a)
/** Expands to a literal uint64_t-typed constant for the value <b>n</b>. */
#define U64_LITERAL(n) (n ## ui64)
#define I64_PRINTF_ARG(a) (a)
#define I64_SCANF_ARG(a) (a)
#define I64_LITERAL(n) (n ## i64)
#else /* !(defined(_MSC_VER)) */
#define U64_PRINTF_ARG(a) ((long long unsigned int)(a))
#define U64_SCANF_ARG(a) ((long long unsigned int*)(a))
#define U64_LITERAL(n) (n ## llu)
#define I64_PRINTF_ARG(a) ((long long signed int)(a))
#define I64_SCANF_ARG(a) ((long long signed int*)(a))
#define I64_LITERAL(n) (n ## ll)
#endif /* defined(_MSC_VER) */
#if defined(__MINGW32__) || defined(__MINGW64__)
#define MINGW_ANY
#endif
#if defined(_MSC_VER) || defined(MINGW_ANY)
/** The formatting string used to put a uint64_t value in a printf() or
* scanf() function. See also U64_PRINTF_ARG and U64_SCANF_ARG. */
#define U64_FORMAT "%I64u"
#define I64_FORMAT "%I64d"
#else /* !(defined(_MSC_VER) || defined(MINGW_ANY)) */
#define U64_FORMAT "%llu"
#define I64_FORMAT "%lld"
#endif /* defined(_MSC_VER) || defined(MINGW_ANY) */
#if (SIZEOF_INTPTR_T == SIZEOF_INT)
#define INTPTR_T_FORMAT "%d"
#define INTPTR_PRINTF_ARG(x) ((int)(x))
#elif (SIZEOF_INTPTR_T == SIZEOF_LONG)
#define INTPTR_T_FORMAT "%ld"
#define INTPTR_PRINTF_ARG(x) ((long)(x))
#elif (SIZEOF_INTPTR_T == 8)
#define INTPTR_T_FORMAT I64_FORMAT
#define INTPTR_PRINTF_ARG(x) I64_PRINTF_ARG(x)
#else
#error Unknown: SIZEOF_INTPTR_T
#endif /* (SIZEOF_INTPTR_T == SIZEOF_INT) || ... */
/** Macro: yield a pointer to the field at position <b>off</b> within the
* structure <b>st</b>. Example:
* <pre>
......
......@@ -19,189 +19,16 @@
#include "orconfig.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <stdbool.h>
#include <limits.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef HAVE_SYS_LIMITS_H
#include <sys/limits.h>
#endif
#ifdef HAVE_MACHINE_LIMITS_H
#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
/* FreeBSD has a bug where it complains that this file is obsolete,
and I should migrate to using sys/limits. It complains even when
I include both.
__FreeBSD_kernel__ is defined by Debian GNU/kFreeBSD which
does the same thing (but doesn't defined __FreeBSD__).
*/
#include <machine/limits.h>
#endif /* !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) */
#endif /* defined(HAVE_MACHINE_LIMITS_H) */
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <stdbool.h>
#if (SIZEOF_INT8_T != 0)
#define HAVE_INT8_T
#endif
#if (SIZEOF_INT16_T != 0)
#define HAVE_INT16_T
#endif
#if (SIZEOF_INT32_T != 0)
#define HAVE_INT32_T
#endif
#if (SIZEOF_INT64_T != 0)
#define HAVE_INT64_T
#endif
#if (SIZEOF_UINT8_T != 0)
#define HAVE_UINT8_T
#endif
#if (SIZEOF_UINT16_T != 0)
#define HAVE_UINT16_T
#endif
#if (SIZEOF_UINT32_T != 0)
#define HAVE_UINT32_T
#endif
#if (SIZEOF_UINT64_T != 0)
#define HAVE_UINT64_T
#endif
#if (SIZEOF_INTPTR_T != 0)
#define HAVE_INTPTR_T
#endif
#if (SIZEOF_UINTPTR_T != 0)
#define HAVE_UINTPTR_T
#endif
#if (SIZEOF_CHAR == 1)
#ifndef HAVE_INT8_T
typedef signed char int8_t;
#define HAVE_INT8_T
#endif
#ifndef HAVE_UINT8_T
typedef unsigned char uint8_t;
#define HAVE_UINT8_T
#endif
#endif /* (SIZEOF_CHAR == 1) */
#if (SIZEOF_SHORT == 2)
#ifndef HAVE_INT16_T
typedef signed short int16_t;
#define HAVE_INT16_T
#endif
#ifndef HAVE_UINT16_T
typedef unsigned short uint16_t;
#define HAVE_UINT16_T
#endif
#endif /* (SIZEOF_SHORT == 2) */
#if (SIZEOF_INT == 2)
#ifndef HAVE_INT16_T
typedef signed int int16_t;
#define HAVE_INT16_T
#endif
#ifndef HAVE_UINT16_T
typedef unsigned int uint16_t;
#define HAVE_UINT16_T
#endif
#elif (SIZEOF_INT == 4)
#ifndef HAVE_INT32_T
typedef signed int int32_t;
#define HAVE_INT32_T
#endif
#ifndef HAVE_UINT32_T
typedef unsigned int uint32_t;
#define HAVE_UINT32_T
#endif
#ifndef UINT16_MAX
#define UINT16_MAX 0xffffu
#endif
#ifndef INT16_MAX
#define INT16_MAX 0x7fff
#endif
#ifndef INT16_MIN
#define INT16_MIN (-INT16_MAX-1)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX 0xffffffffu
#endif
#ifndef INT32_MAX
#define INT32_MAX 0x7fffffff
#endif
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#endif /* (SIZEOF_INT == 2) || ... */
#if (SIZEOF_LONG == 4)
#ifndef HAVE_INT32_T
typedef signed long int32_t;
#define HAVE_INT32_T
#endif
#ifndef HAVE_UINT32_T
typedef unsigned long uint32_t;
#define HAVE_UINT32_T
#ifndef UINT32_MAX
#define UINT32_MAX 0xfffffffful
#endif
#endif /* !defined(HAVE_UINT32_T) */
#elif (SIZEOF_LONG == 8)
#ifndef HAVE_INT64_T
typedef signed long int64_t;
#define HAVE_INT64_T
#endif
#ifndef HAVE_UINT32_T
typedef unsigned long uint64_t;
#define HAVE_UINT32_T
#endif
#ifndef UINT64_MAX
#define UINT64_MAX 0xfffffffffffffffful
#endif
#endif /* (SIZEOF_LONG == 4) || ... */
#if (SIZEOF_LONG_LONG == 8)
#ifndef HAVE_INT64_T
typedef signed long long int64_t;
#define HAVE_INT64_T
#endif
#ifndef HAVE_UINT64_T
typedef unsigned long long uint64_t;
#define HAVE_UINT64_T
#endif
#ifndef UINT64_MAX
#define UINT64_MAX 0xffffffffffffffffull
#endif
#ifndef INT64_MAX
#define INT64_MAX 0x7fffffffffffffffll
#endif
#endif /* (SIZEOF_LONG_LONG == 8) */
#if (SIZEOF___INT64 == 8)
#ifndef HAVE_INT64_T
typedef signed __int64 int64_t;
#define HAVE_INT64_T
#endif
#ifndef HAVE_UINT64_T
typedef unsigned __int64 uint64_t;
#define HAVE_UINT64_T
#endif
#ifndef UINT64_MAX
#define UINT64_MAX 0xffffffffffffffffui64
#endif
#ifndef INT64_MAX
#define INT64_MAX 0x7fffffffffffffffi64
#endif
#endif /* (SIZEOF___INT64 == 8) */
#ifndef INT64_MIN
#define INT64_MIN ((- INT64_MAX) - 1)
#endif
#ifndef SIZE_MAX
#if SIZEOF_SIZE_T == 8
......@@ -223,100 +50,12 @@ typedef int32_t ssize_t;
#endif /* SIZEOF_SIZE_T == 8 || ... */
#endif /* !defined(HAVE_SSIZE_T) */
#if (SIZEOF_VOID_P > 4 && SIZEOF_VOID_P <= 8)
#ifndef HAVE_INTPTR_T
typedef int64_t intptr_t;
#define SIZEOF_INTPTR_T 8
#endif
#ifndef HAVE_UINTPTR_T
typedef uint64_t uintptr_t;
#define SIZEOF_UINTPTR_T 8
#endif
#elif (SIZEOF_VOID_P > 2 && SIZEOF_VOID_P <= 4)
#ifndef HAVE_INTPTR_T
typedef int32_t intptr_t;
#define SIZEOF_INTPTR_T 4
#endif
#ifndef HAVE_UINTPTR_T
typedef uint32_t uintptr_t;
#define SIZEOF_UINTPTR_T 4
#endif
#else
#error "void * is either >8 bytes or <= 2. In either case, I am confused."
#endif /* (SIZEOF_VOID_P > 4 && SIZEOF_VOID_P <= 8) || ... */
#ifndef HAVE_INT8_T
#error "Missing type int8_t"
#endif
#ifndef HAVE_UINT8_T
#error "Missing type uint8_t"
#endif
#ifndef HAVE_INT16_T
#error "Missing type int16_t"
#endif
#ifndef HAVE_UINT16_T
#error "Missing type uint16_t"
#endif
#ifndef HAVE_INT32_T
#error "Missing type int32_t"
#endif
#ifndef HAVE_UINT32_T
#error "Missing type uint32_t"
#endif
#ifndef HAVE_INT64_T
#error "Missing type int64_t"
#endif
#ifndef HAVE_UINT64_T
#error "Missing type uint64_t"
#endif
/* This assumes a sane (2's-complement) representation. But if you
* aren't 2's complement, and you don't define LONG_MAX, then you're so
* bizarre that I want nothing to do with you. */
#ifndef USING_TWOS_COMPLEMENT
#error "Seems that your platform doesn't use 2's complement arithmetic. Argh."
#endif
#ifndef LONG_MAX
#if (SIZEOF_LONG == 4)
#define LONG_MAX 0x7fffffffL
#elif (SIZEOF_LONG == 8)
#define LONG_MAX 0x7fffffffffffffffL
#else
#error "Can't define LONG_MAX"
#endif /* (SIZEOF_LONG == 4) || ... */
#endif /* !defined(LONG_MAX) */
#ifndef INT_MAX
#if (SIZEOF_INT == 4)
#define INT_MAX 0x7fffffffL
#elif (SIZEOF_INT == 8)
#define INT_MAX 0x7fffffffffffffffL
#else
#error "Can't define INT_MAX"
#endif /* (SIZEOF_INT == 4) || ... */
#endif /* !defined(INT_MAX) */
#ifndef UINT_MAX
#if (SIZEOF_INT == 2)
#define UINT_MAX 0xffffu
#elif (SIZEOF_INT == 4)
#define UINT_MAX 0xffffffffu
#elif (SIZEOF_INT == 8)
#define UINT_MAX 0xffffffffffffffffu
#else
#error "Can't define UINT_MAX"
#endif /* (SIZEOF_INT == 2) || ... */
#endif /* !defined(UINT_MAX) */
#ifndef SHORT_MAX
#if (SIZEOF_SHORT == 2)
#define SHORT_MAX 0x7fff
#elif (SIZEOF_SHORT == 4)
#define SHORT_MAX 0x7fffffff
#else
#error "Can't define SHORT_MAX"
#endif /* (SIZEOF_SHORT == 2) || ... */
#endif /* !defined(SHORT_MAX) */
#ifndef TIME_MAX
......
......@@ -16,27 +16,27 @@ int
tor_log2(uint64_t u64)
{
int r = 0;
if (u64 >= (U64_LITERAL(1)<<32)) {
if (u64 >= (UINT64_C(1)<<32)) {
u64 >>= 32;
r = 32;
}
if (u64 >= (U64_LITERAL(1)<<16)) {
if (u64 >= (UINT64_C(1)<<16)) {
u64 >>= 16;
r += 16;
}
if (u64 >= (U64_LITERAL(1)<<8)) {
if (u64 >= (UINT64_C(1)<<8)) {
u64 >>= 8;
r += 8;
}
if (u64 >= (U64_LITERAL(1)<<4)) {
if (u64 >= (UINT64_C(1)<<4)) {
u64 >>= 4;
r += 4;
}
if (u64 >= (U64_LITERAL(1)<<2)) {
if (u64 >= (UINT64_C(1)<<2)) {
u64 >>= 2;
r += 2;
}
if (u64 >= (U64_LITERAL(1)<<1)) {
if (u64 >= (UINT64_C(1)<<1)) {
// u64 >>= 1; // not using this any more.
r += 1;
}
......@@ -55,12 +55,12 @@ round_to_power_of_2(uint64_t u64)
return 1;
lg2 = tor_log2(u64);
low = U64_LITERAL(1) << lg2;
low = UINT64_C(1) << lg2;
if (lg2 == 63)
return low;
high = U64_LITERAL(1) << (lg2+1);
high = UINT64_C(1) << (lg2+1);
if (high - u64 < u64 - low)
return high;
else
......
......@@ -23,7 +23,7 @@ typedef int socklen_t;
* any inadvertent checks for the socket being <= 0 or > 0 will probably
* still work. */
#define tor_socket_t intptr_t
#define TOR_SOCKET_T_FORMAT INTPTR_T_FORMAT
#define TOR_SOCKET_T_FORMAT "%"PRIuPTR
#define SOCKET_OK(s) ((SOCKET)(s) != INVALID_SOCKET)
#define TOR_INVALID_SOCKET INVALID_SOCKET
#else /* !(defined(_WIN32)) */
......
......@@ -51,15 +51,15 @@ tv_udiff(const struct timeval *start, const struct timeval *end)
/* Sanity check tv_usec */
if (start->tv_usec > TOR_USEC_PER_SEC || start->tv_usec < 0) {
log_warn(LD_GENERAL, "comparing times on microsecond detail with bad "
"start tv_usec: " I64_FORMAT " microseconds",
I64_PRINTF_ARG(start->tv_usec));
"start tv_usec: %"PRId64 " microseconds",
(int64_t)start->tv_usec);
return LONG_MAX;
}
if (end->tv_usec > TOR_USEC_PER_SEC || end->tv_usec < 0) {
log_warn(LD_GENERAL, "comparing times on microsecond detail with bad "
"end tv_usec: " I64_FORMAT " microseconds",
I64_PRINTF_ARG(end->tv_usec));
"end tv_usec: %"PRId64 " microseconds",
(int64_t)end->tv_usec);
return LONG_MAX;
}
......@@ -72,7 +72,7 @@ tv_udiff(const struct timeval *start, const struct timeval *end)
if (secdiff > (int64_t)(LONG_MAX/1000000 - 1) ||
secdiff < (int64_t)(LONG_MIN/1000000 + 1)) {
log_warn(LD_GENERAL, "comparing times on microsecond detail too far "
"apart: " I64_FORMAT " seconds", I64_PRINTF_ARG(secdiff));
"apart: %"PRId64 " seconds", (secdiff));
return LONG_MAX;
}
......@@ -100,15 +100,15 @@ tv_mdiff(const struct timeval *start, const struct timeval *end)
/* Sanity check tv_usec */
if (start->tv_usec > TOR_USEC_PER_SEC || start->tv_usec < 0) {
log_warn(LD_GENERAL, "comparing times on millisecond detail with bad "
"start tv_usec: " I64_FORMAT " microseconds",
I64_PRINTF_ARG(start->tv_usec));
"start tv_usec: %"PRId64 " microseconds",
(int64_t)start->tv_usec);
return LONG_MAX;
}
if (end->tv_usec > TOR_USEC_PER_SEC || end->tv_usec < 0) {
log_warn(LD_GENERAL, "comparing times on millisecond detail with bad "
"end tv_usec: " I64_FORMAT " microseconds",
I64_PRINTF_ARG(end->tv_usec));
"end tv_usec: %"PRId64 " microseconds",
(int64_t)end->tv_usec);
return LONG_MAX;
}
......@@ -124,7 +124,7 @@ tv_mdiff(const struct timeval *start, const struct timeval *end)
if (secdiff > (int64_t)(LONG_MAX/1000 - 2) ||
secdiff < (int64_t)(LONG_MIN/1000 + 1)) {
log_warn(LD_GENERAL, "comparing times on millisecond detail too far "
"apart: " I64_FORMAT " seconds", I64_PRINTF_ARG(secdiff));
"apart: %"PRId64 " seconds", (int64_t)secdiff);
return LONG_MAX;
}
......
......@@ -2442,8 +2442,8 @@ tls_get_write_overhead_ratio,(void))
if (total_bytes_written_over_tls == 0)
return 1.0;
return U64_TO_DBL(total_bytes_written_by_tls) /
U64_TO_DBL(total_bytes_written_over_tls);
return ((double)total_bytes_written_by_tls) /
((double)total_bytes_written_over_tls);
}
/** Implement check_no_tls_errors: If there are any pending OpenSSL
......
......@@ -100,9 +100,9 @@ correct_tm(int islocal, const time_t *timep, struct tm *resultbuf,
/* LCOV_EXCL_STOP */
done:
if (err_out) {
tor_asprintf(err_out, "%s("I64_FORMAT") failed with error %s: %s",
tor_asprintf(err_out, "%s(%"PRId64") failed with error %s: %s",
islocal?"localtime":"gmtime",
timep?I64_PRINTF_ARG(*timep):0,
timep?((int64_t)*timep):0,
strerror(errno),
outcome);
}
......
......@@ -44,10 +44,10 @@ tor_gettimeofday, (struct timeval *timeval))
#ifdef _WIN32
/* Epoch bias copied from perl: number of units between windows epoch and
* Unix epoch. */
#define EPOCH_BIAS U64_LITERAL(116444736000000000)
#define UNITS_PER_SEC U64_LITERAL(10000000)
#define USEC_PER_SEC U64_LITERAL(1000000)
#define UNITS_PER_USEC U64_LITERAL(10)
#define EPOCH_BIAS UINT64_C(116444736000000000)
#define UNITS_PER_SEC UINT64_C(10000000)
#define USEC_PER_SEC UINT64_C(1000000)
#define UNITS_PER_USEC UINT64_C(10)
union {
uint64_t ft_64;
FILETIME ft_ft;
......
......@@ -643,7 +643,7 @@ client_dns_incr_failures(const char *address)
ent->expires = time(NULL) + MAX_DNS_ENTRY_AGE;
strmap_set(addressmap,address,ent);
}
if (ent->num_resolve_failures < SHORT_MAX)
if (ent->num_resolve_failures < SHRT_MAX)
++ent->num_resolve_failures; /* don't overflow */
log_info(LD_APP, "Address %s now has %d resolve failures.",
safe_str_client(address),
......
This diff is collapsed.
......@@ -283,10 +283,10 @@ channelpadding_update_padding_for_channel(channel_t *chan,
pad_vars->ito_high_ms);
log_fn(LOG_INFO,LD_OR,
"Negotiated padding=%d, lo=%d, hi=%d on "U64_FORMAT,
"Negotiated padding=%d, lo=%d, hi=%d on %"PRIu64,
chan->padding_enabled, chan->padding_timeout_low_ms,
chan->padding_timeout_high_ms,
U64_PRINTF_ARG(chan->global_identifier));
(chan->global_identifier));
return 1;
}
......@@ -394,13 +394,13 @@ channelpadding_send_padding_cell_for_callback(channel_t *chan)
monotime_coarse_get(&now);
log_fn(LOG_INFO,LD_OR,
"Sending netflow keepalive on "U64_FORMAT" to %s (%s) after "
I64_FORMAT" ms. Delta "I64_FORMAT"ms",
U64_PRINTF_ARG(chan->global_identifier),
"Sending netflow keepalive on %"PRIu64" to %s (%s) after "
"%"PRId64" ms. Delta %"PRId64"ms",
(chan->global_identifier),
safe_str_client(chan->get_remote_descr(chan, 0)),
safe_str_client(hex_str(chan->identity_digest, DIGEST_LEN)),
I64_PRINTF_ARG(monotime_coarse_diff_msec(&chan->timestamp_xfer,&now)),
I64_PRINTF_ARG(
(monotime_coarse_diff_msec(&chan->timestamp_xfer,&now)),
(
monotime_coarse_diff_msec(&chan->next_padding_time,&now)));
}
......@@ -540,9 +540,9 @@ channelpadding_compute_time_until_pad_for_netflow(channel_t *chan)
if (ms_till_pad > DFLT_NETFLOW_INACTIVE_KEEPALIVE_MAX) {
tor_fragile_assert();
log_warn(LD_BUG,
"Channel padding timeout scheduled "I64_FORMAT"ms in the future. "
"Channel padding timeout scheduled %"PRId64"ms in the future. "
"Did the monotonic clock just jump?",
I64_PRINTF_ARG(ms_till_pad));
(ms_till_pad));
return 0; /* Clock jumped: Send padding now */
}
......@@ -566,8 +566,8 @@ channelpadding_compute_time_until_pad_for_netflow(channel_t *chan)
int severity = (ms_till_pad < -NETFLOW_MISSED_WINDOW)
? LOG_NOTICE : LOG_INFO;
log_fn(severity, LD_OR,
"Channel padding timeout scheduled "I64_FORMAT"ms in the past. ",
I64_PRINTF_ARG(-ms_till_pad));
"Channel padding timeout scheduled %"PRId64"ms in the past. ",
(-ms_till_pad));
return 0; /* Clock jumped: Send padding now */
}
......@@ -698,8 +698,8 @@ channelpadding_reduce_padding_on_channel(channel_t *chan)