summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-11-09 17:24:58 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-11-09 17:24:58 +0100
commit2c71060d25f18e75ae14154bf50d24909e2872c1 (patch)
tree503c59bab6a26f0b9d2d32d80c48d392e43875fa
parentc34723cfb980c6a8d957892cfd5466df44b50863 (diff)
downloadfastd-2c71060d25f18e75ae14154bf50d24909e2872c1.tar
fastd-2c71060d25f18e75ae14154bf50d24909e2872c1.zip
Check return value of sodium_init()
Fixes a warning with -Wunused-result.
-rw-r--r--src/fastd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fastd.c b/src/fastd.c
index 2d0b47a..8723add 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -481,7 +481,8 @@ static inline void init_config(int *status_fd) {
/* Init crypto libs here as fastd_config_check() initializes the methods and might need them */
#ifdef HAVE_LIBSODIUM
- sodium_init();
+ if (sodium_init() < 0)
+ exit_error("unable to initialize libsodium");
#endif
#ifdef ENABLE_OPENSSL