Fix stupid uses of sizeof(), thanks to mirraz1@rambler.ru
authorColin Leroy <colin@colino.net>
Fri, 30 May 2014 14:10:03 +0000 (16:10 +0200)
committerColin Leroy <colin@colino.net>
Fri, 30 May 2014 14:10:03 +0000 (16:10 +0200)
Fixes bug #2981, "claws-mail-3.9.3 compilation warnings"

src/plugins/vcalendar/libical/libical/sspm.c

index 6d1d470a6caf3211e3c3f33f4c299f35861f8f61..7606521940069d75bc250facd4aaa4124018a385 100644 (file)
@@ -685,8 +685,7 @@ void* sspm_make_part(struct mime_impl *impl,
                break;
            }
            
                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)){
                *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) &&
 
                /* 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;
                    /* 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: {
            }
            
            case HEADER_CONTINUATION: {
-               char* last_line, *end;
+               char* last_line;
                char *buf_start;
 
                if(current_line < 0){
                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];
                }
 
                last_line = header_lines[current_line];
-               end = (char*) ( (size_t)strlen(last_line)+
-                                     (size_t)last_line);
                
                impl->state = IN_HEADER;
 
                
                impl->state = IN_HEADER;