From 6427c80b3ed6eb3890279ad408fdfc9ca9ceab76 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 22 May 2014 03:45:05 +0200 Subject: verify: use default tristate constants --- src/verify.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/verify.c b/src/verify.c index 876e133..694206f 100644 --- a/src/verify.c +++ b/src/verify.c @@ -84,7 +84,7 @@ fastd_tristate_t fastd_verify_peer(fastd_peer_t *peer, fastd_socket_t *sock, con bool ret = do_verify(env); fastd_shell_env_free(env); fastd_peer_set_verified(peer, ret); - return (fastd_tristate_t){.set = true, .state = ret}; + return ret ? fastd_tristate_true : fastd_tristate_false; } else { verify_arg_t *arg = calloc(1, sizeof(verify_arg_t) + data_len); @@ -106,11 +106,11 @@ fastd_tristate_t fastd_verify_peer(fastd_peer_t *peer, fastd_socket_t *sock, con fastd_shell_env_free(env); free(arg); - return (fastd_tristate_t){.set = true, .state = false}; + return fastd_tristate_false; } pthread_detach(thread); - return (fastd_tristate_t){.set = false}; + return fastd_tristate_undef; } } -- cgit v1.2.3