summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/common.c4
-rw-r--r--src/rfc2388.c6
-rw-r--r--src/sliding_buffer.c5
3 files changed, 8 insertions, 7 deletions
diff --git a/src/common.c b/src/common.c
index ecb0278..19ec4f1 100644
--- a/src/common.c
+++ b/src/common.c
@@ -1,5 +1,5 @@
/* --------------------------------------------------------------------------
- * Copyright 2003-2011 (inclusive) Nathan Angelacos
+ * Copyright 2003-2014 (inclusive) Nathan Angelacos
* (nangel@users.sourceforge.net)
*
* This file is part of haserl.
@@ -258,7 +258,7 @@ buffer_add (buffer_t * buf, const void *data, unsigned long size)
buf->data = realloc (buf->data, newsize);
if ( buf->data == NULL )
{
- die_with_message ( NULL, NULL, 'Memory allocation error');
+ die_with_message ( NULL, NULL, "Memory allocation error");
}
buf->limit = buf->data + newsize;
buf->ptr = buf->data + index;
diff --git a/src/rfc2388.c b/src/rfc2388.c
index 600e11b..971a2e1 100644
--- a/src/rfc2388.c
+++ b/src/rfc2388.c
@@ -1,5 +1,5 @@
/* --------------------------------------------------------------------------
- * Copyright 2003-2011 (inclusive) Nathan Angelacos
+ * Copyright 2003-2014 (inclusive) Nathan Angelacos
* (nangel@users.sourceforge.net)
*
* This file is part of haserl.
@@ -137,7 +137,7 @@ mime_tag_add (mime_var_t * obj, char *str)
{
a += strlen (tag[0]);
b = strchr (a, '"');
- if (!obj->name) && ( b )
+ if ( (!obj->name) && ( b ) )
obj->name = mime_substr (a, b - a);
}
@@ -146,7 +146,7 @@ mime_tag_add (mime_var_t * obj, char *str)
{
a += strlen (tag[1]);
b = strchr (a, '"');
- if (!obj->filename) && ( b )
+ if ( (!obj->filename) && ( b ) )
obj->filename = mime_substr (a, b - a);
}
diff --git a/src/sliding_buffer.c b/src/sliding_buffer.c
index be4ea88..1adade5 100644
--- a/src/sliding_buffer.c
+++ b/src/sliding_buffer.c
@@ -31,6 +31,7 @@
#include <fcntl.h>
#include "sliding_buffer.h"
+#include "h_error.h"
/*
* initialize a sliding buffer structure
@@ -129,9 +130,9 @@ s_buffer_read (sliding_buffer_t * sbuf, char *matchstr)
pos = 0;
len = sbuf->bufsize - (int) (sbuf->ptr - sbuf->buf) - strlen (matchstr);
/* On a short read or very long matchstr, its possible to force len < 0 - That is bad. */
- if ( len < 0 ) i
+ if ( len < 0 )
{
- die_with_message ( NULL, NULL, 'Short Read or MIME decode failure' );
+ die_with_message ( NULL, NULL, "Short Read or MIME decode failure" );
}
while (memcmp (matchstr, sbuf->ptr + pos, strlen (matchstr)) && (pos < len))
{