X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fapcups.c;h=4b3f7b5c9de7b5120840e7233ca0c6c671106ca2;hp=622e3a10b37c8dfbd9240842401cdd68f65e4c09;hb=6e41c3b1f024d7944e5e8010a87933555c662474;hpb=029b489b237a8785c539f85d4840a49ba6743603 diff --git a/src/apcups.c b/src/apcups.c index 622e3a10..4b3f7b5c 100644 --- a/src/apcups.c +++ b/src/apcups.c @@ -285,7 +285,7 @@ static int apc_query_server(char const *node, char const *service, "first %i iterations. Will close the socket " "in future iterations.", count_retries, count_iterations); - conf_persistent_conn = 0; + conf_persistent_conn = false; } while ((n = net_recv(&global_sockfd, recvline, sizeof(recvline) - 1)) > 0) { @@ -347,7 +347,7 @@ static int apc_query_server(char const *node, char const *service, } static int apcups_config(oconfig_item_t *ci) { - bool persistent_conn_set = 0; + bool persistent_conn_set = false; for (int i = 0; i < ci->children_num; i++) { oconfig_item_t *child = ci->children + i; @@ -360,7 +360,7 @@ static int apcups_config(oconfig_item_t *ci) { cf_util_get_boolean(child, &conf_report_seconds); else if (strcasecmp(child->key, "PersistentConnection") == 0) { cf_util_get_boolean(child, &conf_persistent_conn); - persistent_conn_set = 1; + persistent_conn_set = true; } else ERROR("apcups plugin: Unknown config option \"%s\".", child->key); } @@ -372,7 +372,7 @@ static int apcups_config(oconfig_item_t *ci) { "Apcupsd NIS socket timeout is %.3f seconds, " "PersistentConnection disabled by default.", interval, APCUPS_SERVER_TIMEOUT); - conf_persistent_conn = 0; + conf_persistent_conn = false; } }