projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.8' into collectd-master
[collectd.git]
/
src
/
libcollectdclient
/
network_buffer.c
diff --git
a/src/libcollectdclient/network_buffer.c
b/src/libcollectdclient/network_buffer.c
index
a0f8cfd
..
5a1ee8d
100644
(file)
--- a/
src/libcollectdclient/network_buffer.c
+++ b/
src/libcollectdclient/network_buffer.c
@@
-30,6
+30,7
@@
#include <assert.h>
#include <errno.h>
#include <math.h>
#include <assert.h>
#include <errno.h>
#include <math.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
@@
-122,40
+123,40
@@
struct lcc_network_buffer_s {
/*
* Private functions
*/
/*
* Private functions
*/
-static
_B
ool have_gcrypt(void) /* {{{ */
+static
b
ool 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;
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))
#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))
#endif
if (!gcry_check_version(GCRYPT_VERSION))
- return
0
;
+ return
false
;
if (!gcry_control(GCRYCTL_INIT_SECMEM, 32768, 0))
if (!gcry_control(GCRYCTL_INIT_SECMEM, 32768, 0))
- return
0
;
+ return
false
;
gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
- result =
1
;
- return
1
;
+ result =
true
;
+ return
true
;
#else
#else
- return
0
;
+ return
false
;
#endif
#endif
-} /* }}}
_B
ool have_gcrypt */
+} /* }}}
b
ool have_gcrypt */
#ifndef HAVE_HTONLL
static uint64_t htonll(uint64_t val) /* {{{ */
{
#ifndef HAVE_HTONLL
static uint64_t htonll(uint64_t val) /* {{{ */
{
- static int config
= 0
;
+ static int config;
uint32_t hi;
uint32_t lo;
uint32_t hi;
uint32_t lo;
@@
-185,7
+186,7
@@
static uint64_t htonll(uint64_t val) /* {{{ */
static double htond(double val) /* {{{ */
{
static double htond(double val) /* {{{ */
{
- static int config
= 0
;
+ static int config;
union {
uint8_t byte[8];
union {
uint8_t byte[8];