aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-08 18:23:11 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-08 18:23:11 +0100
commit2e813ecec7fcc8358c44d3f6cfd9f942404b3749 (patch)
treee4c81910f06bd7e89b3849d292dc7e921d3ec09f /src
parentm (diff)
downloadmds-2e813ecec7fcc8358c44d3f6cfd9f942404b3749.tar.gz
mds-2e813ecec7fcc8358c44d3f6cfd9f942404b3749.tar.bz2
mds-2e813ecec7fcc8358c44d3f6cfd9f942404b3749.tar.xz
m + buf fix: wrong element size on malloc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mds-kbdc/raw-data.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mds-kbdc/raw-data.c b/src/mds-kbdc/raw-data.c
index fcdf4ad..270fdd6 100644
--- a/src/mds-kbdc/raw-data.c
+++ b/src/mds-kbdc/raw-data.c
@@ -20,6 +20,7 @@
#include "globals.h"
#include <libmdsserver/macros.h>
+
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -158,9 +159,9 @@ static size_t remove_comments(char* restrict content, size_t size)
else if (escape) t, escape = 0;
else if (quote)
{
- t;
- if (c == '\\') escape = 1;
- else if (c == '"') quote = 0;
+ t
+ if (c == '\\') escape = 1;
+ else if (c == '"') quote = 0;
}
/* # is the comment symbol. */
else if (c == '#') comment = 1;
@@ -205,7 +206,7 @@ static char** line_split(char* content, size_t length)
if (content[i] == '\n')
count++;
- fail_if (xmalloc(lines, count + 1, char));
+ fail_if (xmalloc(lines, count + 1, char*));
lines[count] = NULL;
for (i = j = 0; i < length; i++)