diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-09 17:24:58 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-09 17:24:58 +0100 |
commit | 2c71060d25f18e75ae14154bf50d24909e2872c1 (patch) | |
tree | 503c59bab6a26f0b9d2d32d80c48d392e43875fa /src | |
parent | c34723cfb980c6a8d957892cfd5466df44b50863 (diff) | |
download | fastd-2c71060d25f18e75ae14154bf50d24909e2872c1.tar fastd-2c71060d25f18e75ae14154bf50d24909e2872c1.zip |
Check return value of sodium_init()
Fixes a warning with -Wunused-result.
Diffstat (limited to 'src')
-rw-r--r-- | src/fastd.c | 3 |
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 |