**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "configfile.h"
{
size_t len = size * nmemb;
- if (len <= 0)
+ if (len == 0)
return (len);
if ((ascent_buffer_fill + len) >= ascent_buffer_size)
{
char *temp;
- temp = (char *) realloc (ascent_buffer,
+ temp = realloc (ascent_buffer,
ascent_buffer_fill + len + 1);
if (temp == NULL)
{
static int ascent_xml_sessions (xmlDoc *doc, xmlNode *node) /* {{{ */
{
xmlNode *child;
- player_stats_t ps;
-
- memset (&ps, 0, sizeof (ps));
+ player_stats_t ps = {
+ .level_sum = 0
+ };
for (child = node->xmlChildrenNode; child != NULL; child = child->next)
{