summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-05-22 03:45:05 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-05-22 03:45:05 +0200
commit6427c80b3ed6eb3890279ad408fdfc9ca9ceab76 (patch)
treee0b8455fb183e03668a49c3df8d6ee29e7cb5908 /src
parentfa486bd8ec84f7367847852f48ecc4239e5d1657 (diff)
downloadfastd-6427c80b3ed6eb3890279ad408fdfc9ca9ceab76.tar
fastd-6427c80b3ed6eb3890279ad408fdfc9ca9ceab76.zip
verify: use default tristate constants
Diffstat (limited to 'src')
-rw-r--r--src/verify.c6
1 files 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;
}
}