#include <errno.h>
#include <stdio.h> /* for printf */
#include <stdarg.h> /* for va_list, va_start, etc. */
-
-#define BUF_SIZE 1024
+
+#define TMP_BUF_SIZE 1024
/* Private routines for icalproperty */
void icalvalue_set_parent(icalvalue* value,
icalproperty* icalproperty_new_from_string(char* str)
{
- size_t buf_size = BUF_SIZE;
+ size_t buf_size = 1024;
char* buf;
char* buf_ptr;
icalproperty *prop;
the caller forgetting to free it */
const char* property_name = 0;
- size_t buf_size = BUF_SIZE;
+ size_t buf_size = 1024;
char* buf;
char* buf_ptr;
icalvalue* value;
}
if (kind_string == 0 ) {
- char *temp;
- temp = g_strdup_printf(temp, "Got a parameter of unknown kind in %s property", property_name);
+ char temp[TMP_BUF_SIZE];
+ snprintf(temp, TMP_BUF_SIZE,"Got a parameter of unknown kind in %s property",property_name);
icalerror_warn(temp);
- g_free(temp);
continue;
}