From 9f06331a0b8bed561476c413f2d9699044e92be3 Mon Sep 17 00:00:00 2001 From: Jman012 Date: Tue, 11 Mar 2014 13:11:22 -0700 Subject: [PATCH] Fixed another clang issue with bools that broek file sending. --- src/misc_tools.c | 4 ++-- src/misc_tools.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/misc_tools.c b/src/misc_tools.c index f527549..b13b8fe 100644 --- a/src/misc_tools.c +++ b/src/misc_tools.c @@ -156,8 +156,8 @@ char *wc_to_char(wchar_t ch) return ret; } -/* Returns true if connection has timed out, false otherwise */ -bool timed_out(uint64_t timestamp, uint64_t curtime, uint64_t timeout) +/* Returns 1 if connection has timed out, 0 otherwise */ +int timed_out(uint64_t timestamp, uint64_t curtime, uint64_t timeout) { return timestamp + timeout <= curtime; } diff --git a/src/misc_tools.h b/src/misc_tools.h index 4d711e9..41d31a1 100644 --- a/src/misc_tools.h +++ b/src/misc_tools.h @@ -48,8 +48,8 @@ uint8_t *wcs_to_mbs(wchar_t *string); /* convert a wide char to multibyte char */ char *wc_to_char(wchar_t ch); -/* Returns true if connection has timed out, false otherwise */ -bool timed_out(uint64_t timestamp, uint64_t timeout, uint64_t curtime); +/* Returns 1 if connection has timed out, 0 otherwise */ +int timed_out(uint64_t timestamp, uint64_t timeout, uint64_t curtime); /* Colours the window tab according to type. Beeps if is_beep is true */ void alert_window(ToxWindow *self, int type, bool is_beep);