Merge pull request #1710 from rpv-tomsk/perl-plugin-fixes
[collectd.git] / src / liboconfig / scanner.l
index 638e3a2..7a831c2 100644 (file)
@@ -28,6 +28,7 @@
 
 %{
 #include <stdlib.h>
+#include <string.h>
 #include "oconfig.h"
 #include "aux_types.h"
 #include "parser.h"
@@ -145,7 +146,7 @@ static void ml_append (char *string)
 
        if (ml_free <= len) {
                ml_len += len - ml_free + 1;
-               ml_buffer = (char *)realloc (ml_buffer, ml_len);
+               ml_buffer = realloc (ml_buffer, ml_len);
                if (NULL == ml_buffer)
                        YY_FATAL_ERROR ("out of dynamic memory in ml_append");
        }