diff options
Diffstat (limited to 'libical/src/libical/icalmime.c')
-rw-r--r-- | libical/src/libical/icalmime.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/libical/src/libical/icalmime.c b/libical/src/libical/icalmime.c index e5d1c90601..6e11e9e326 100644 --- a/libical/src/libical/icalmime.c +++ b/libical/src/libical/icalmime.c @@ -38,10 +38,6 @@ #include "dmalloc.h" #endif -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp -#endif /* These *_part routines are called by the MIME parser via the local_action_map */ @@ -209,12 +205,8 @@ icalcomponent* icalmime_parse(char* (*get_string)(char *s, size_t size, } if(parts[i].header.error!=SSPM_NO_ERROR){ - char *str = "Unknown error"; - char temp[256]; - - if(parts[i].header.error==SSPM_MALFORMED_HEADER_ERROR){ - str = "Malformed header, possibly due to input not in MIME format"; - } + char *str; + char* temp[256]; if(parts[i].header.error==SSPM_UNEXPECTED_BOUNDARY_ERROR){ str = "Got an unexpected boundary, possibly due to a MIME header for a MULTIPART part that is missing the Content-Type line"; @@ -235,16 +227,16 @@ line between the header and the previous boundary\?"; } if(parts[i].header.error_text != 0){ - snprintf(temp,sizeof(temp), + snprintf((char*)temp,256, "%s: %s",str,parts[i].header.error_text); } else { - strcpy(temp,str); + strcpy((char*)temp,str); } icalcomponent_add_property (comp, icalproperty_vanew_xlicerror( - temp, + (char*)temp, icalparameter_new_xlicerrortype( ICAL_XLICERRORTYPE_MIMEPARSEERROR), 0)); |