talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 8864301817cf1a62dc7f08fedaeebc8da66d6acb
parent d2af47b2de8d3d72eddecce24d9bbf83738414b0
Author: Colin Leroy <colin@colino.net>
Date:   Fri, 30 May 2014 16:10:03 +0200

Fix stupid uses of sizeof(), thanks to mirraz1@rambler.ru
Fixes bug #2981, "claws-mail-3.9.3 compilation warnings"

Diffstat:
Msrc/plugins/vcalendar/libical/libical/sspm.c | 11+++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/plugins/vcalendar/libical/libical/sspm.c b/src/plugins/vcalendar/libical/libical/sspm.c @@ -685,8 +685,7 @@ void* sspm_make_part(struct mime_impl *impl, break; } - if(strncmp((line+2),parent_header->boundary, - sizeof(parent_header->boundary)) == 0){ + if(strcmp((line+2),parent_header->boundary) == 0){ *end_part = action.end_part(part); if(sspm_is_mime_boundary(line)){ @@ -791,9 +790,7 @@ void* sspm_make_multipart_subpart(struct mime_impl *impl, /* Check if it is the right boundary */ if(!sspm_is_mime_terminating_boundary(line) && - strncmp((line+2),parent_header->boundary, - sizeof(parent_header->boundary)) - == 0){ + strcmp((line+2),parent_header->boundary) == 0){ /* The +2 in strncmp skips over the leading "--" */ break; @@ -954,7 +951,7 @@ void sspm_read_header(struct mime_impl *impl,struct sspm_header *header) } case HEADER_CONTINUATION: { - char* last_line, *end; + char* last_line; char *buf_start; if(current_line < 0){ @@ -965,8 +962,6 @@ void sspm_read_header(struct mime_impl *impl,struct sspm_header *header) } last_line = header_lines[current_line]; - end = (char*) ( (size_t)strlen(last_line)+ - (size_t)last_line); impl->state = IN_HEADER;