From abc17b0f8997ab07ae66130edd5dc8c43e72c886 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 8 Jul 2018 08:43:42 +0000 Subject: Factor out time keeping code into its own module: mono_time.c. It turns out, `unix_time` is also monotonic, and is used as such, so I've renamed the new functions to `mono_time_*`. 2018-07-08: ``` 00:01 <@irungentoo> the idea used to be that the unix_time() function could go backward in time but I think I might have started using it like if it could not after I changed it so that it would never go back in time ``` --- toxcore/tox.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'toxcore/tox.c') diff --git a/toxcore/tox.c b/toxcore/tox.c index c121eb2e..4c764aeb 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c @@ -518,6 +518,11 @@ static void set_friend_error(int32_t ret, Tox_Err_Friend_Add *error) case FAERR_NOMEM: SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_ADD_MALLOC); break; + + default: + /* can't happen */ + assert(!"impossible: unknown friend-add error"); + break; } } @@ -826,7 +831,9 @@ static void set_message_error(int ret, Tox_Err_Friend_Send_Message *error) break; case -5: + default: /* can't happen */ + assert(!"impossible: unknown send-message error"); break; } } -- cgit v1.2.3