diff --git a/src/ascent.c b/src/ascent.c
index 504decc4a91593bde0781bca4fac83837895b579..11bb97f0c6bce3b3abe457090053173d91a01737 100644 (file)
--- a/src/ascent.c
+++ b/src/ascent.c
#include "common.h"
#include "plugin.h"
-#include "configfile.h"
#include <curl/curl.h>
#include <libxml/parser.h>
@@ -182,20 +181,19 @@ static size_t ascent_curl_callback (void *buf, size_t size, size_t nmemb, /* {{{
static int ascent_submit_players (player_stats_t *ps) /* {{{ */
{
- size_t i;
gauge_t value;
- for (i = 0; i < RACES_LIST_LENGTH; i++)
+ for (size_t i = 0; i < RACES_LIST_LENGTH; i++)
if (races_list[i] != NULL)
ascent_submit_gauge ("by-race", "players", races_list[i],
(gauge_t) ps->races[i]);
- for (i = 0; i < CLASSES_LIST_LENGTH; i++)
+ for (size_t i = 0; i < CLASSES_LIST_LENGTH; i++)
if (classes_list[i] != NULL)
ascent_submit_gauge ("by-class", "players", classes_list[i],
(gauge_t) ps->classes[i]);
- for (i = 0; i < GENDERS_LIST_LENGTH; i++)
+ for (size_t i = 0; i < GENDERS_LIST_LENGTH; i++)
if (genders_list[i] != NULL)
ascent_submit_gauge ("by-gender", "players", genders_list[i],
(gauge_t) ps->genders[i]);
static int ascent_xml_sessions_plr (xmlDoc *doc, xmlNode *node, /* {{{ */
player_info_t *pi)
{
- xmlNode *child;
-
- for (child = node->xmlChildrenNode; child != NULL; child = child->next)
+ for (xmlNode *child = node->xmlChildrenNode; child != NULL; child = child->next)
{
if ((xmlStrcmp ((const xmlChar *) "comment", child->name) == 0)
|| (xmlStrcmp ((const xmlChar *) "text", child->name) == 0))
static int ascent_xml_sessions (xmlDoc *doc, xmlNode *node) /* {{{ */
{
- xmlNode *child;
player_stats_t ps = {
.level_sum = 0
};
- for (child = node->xmlChildrenNode; child != NULL; child = child->next)
+ for (xmlNode *child = node->xmlChildrenNode; child != NULL; child = child->next)
{
if ((xmlStrcmp ((const xmlChar *) "comment", child->name) == 0)
|| (xmlStrcmp ((const xmlChar *) "text", child->name) == 0))
static int ascent_xml_status (xmlDoc *doc, xmlNode *node) /* {{{ */
{
- xmlNode *child;
-
- for (child = node->xmlChildrenNode; child != NULL; child = child->next)
+ for (xmlNode *child = node->xmlChildrenNode; child != NULL; child = child->next)
{
if ((xmlStrcmp ((const xmlChar *) "comment", child->name) == 0)
|| (xmlStrcmp ((const xmlChar *) "text", child->name) == 0))
{
xmlDoc *doc;
xmlNode *cur;
- xmlNode *child;
#if 0
doc = xmlParseMemory (data, strlen (data),
return (-1);
}
- for (child = cur->xmlChildrenNode; child != NULL; child = child->next)
+ for (xmlNode *child = cur->xmlChildrenNode; child != NULL; child = child->next)
{
if ((xmlStrcmp ((const xmlChar *) "comment", child->name) == 0)
|| (xmlStrcmp ((const xmlChar *) "text", child->name) == 0))