X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Flibcollectdclient%2Fnetwork_buffer.c;h=373dd2b7ecf666ccf6a7d10534b1faa96cd1211c;hb=6e41c3b1f024d7944e5e8010a87933555c662474;hp=a0f8cfdc3cfa74ae36d9954ceb1955c993338770;hpb=ce5436d10d28b9d8c2cb204726e36823df2c6766;p=collectd.git diff --git a/src/libcollectdclient/network_buffer.c b/src/libcollectdclient/network_buffer.c index a0f8cfdc..373dd2b7 100644 --- a/src/libcollectdclient/network_buffer.c +++ b/src/libcollectdclient/network_buffer.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -122,35 +123,35 @@ struct lcc_network_buffer_s { /* * Private functions */ -static _Bool have_gcrypt(void) /* {{{ */ +static bool have_gcrypt(void) /* {{{ */ { - static _Bool result = 0; - static _Bool need_init = 1; + static bool result; + static bool need_init = true; if (!need_init) return result; - need_init = 0; + need_init = false; #if HAVE_GCRYPT_H #if GCRYPT_VERSION_NUMBER < 0x010600 if (gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread)) - return 0; + return false; #endif if (!gcry_check_version(GCRYPT_VERSION)) - return 0; + return false; if (!gcry_control(GCRYCTL_INIT_SECMEM, 32768, 0)) - return 0; + return false; gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); - result = 1; - return 1; + result = true; + return true; #else - return 0; + return false; #endif -} /* }}} _Bool have_gcrypt */ +} /* }}} bool have_gcrypt */ #ifndef HAVE_HTONLL static uint64_t htonll(uint64_t val) /* {{{ */