diff --git a/src/archive.c b/src/archive.c index e85dbb0..9a0ffe9 100644 --- a/src/archive.c +++ b/src/archive.c @@ -305,5 +305,3 @@ return 0; } - - diff --git a/src/attachment.c b/src/attachment.c index 29850bb..70a156b 100644 --- a/src/attachment.c +++ b/src/attachment.c @@ -169,5 +169,3 @@ return attachments; } - - diff --git a/src/base64.c b/src/base64.c index d130c93..82e69ff 100644 --- a/src/base64.c +++ b/src/base64.c @@ -71,9 +71,8 @@ } buf[i] = *(in+j); - i++; + i++; } base64_encode_block(buf, i, &out[pos]); } - diff --git a/src/bdat.c b/src/bdat.c index f410eb7..701fdf2 100644 --- a/src/bdat.c +++ b/src/bdat.c @@ -78,7 +78,7 @@ else syslog(LOG_PRIORITY, "ERROR: write(), %s, %d, %s", __func__, __LINE__, __FILE__); } - + if(session->bdat_bytes_to_read < 0){ // malformed data from client: we got more data then had been told in BDAT argument syslog(LOG_PRIORITY, "ERROR: invalid BDAT data. Expected %d, got %d bytes", session->bdat_bytes_to_read + readlen, readlen); diff --git a/src/cfg.c b/src/cfg.c index 7734d98..820e5cd 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -148,7 +148,7 @@ printf("failed to parse %s: \"%s\"\n", line, chpos+1); } break; - } + } i++; } @@ -230,7 +230,7 @@ trimBuffer(p); printf("%s=%s\n", rules[i].name, p); } - + } @@ -297,12 +297,10 @@ i++; } - + if(!rules[i].name) printf("unknown key: \"%s\" \n", line); } } fclose(f); } - - diff --git a/src/clamd.c b/src/clamd.c index e5a7d17..8f7f3f0 100644 --- a/src/clamd.c +++ b/src/clamd.c @@ -41,7 +41,7 @@ /* issue the SCAN command with full path to the temporary directory */ - + memset(scan_cmd, 0, SMALLBUFSIZE); snprintf(scan_cmd, SMALLBUFSIZE-1, "SCAN %s/%s\r\n", cfg->workdir, tmpfile); diff --git a/src/config.h b/src/config.h index 3ec7f1b..117f3f8 100644 --- a/src/config.h +++ b/src/config.h @@ -136,4 +136,3 @@ #define S_STATUS_ERROR "error" #endif /* _CONFIG_H */ - diff --git a/src/counters.c b/src/counters.c index 2bdeedc..35ad940 100644 --- a/src/counters.c +++ b/src/counters.c @@ -74,7 +74,7 @@ if(counters->c_stored_size > 0) memcached_increment(&(data->memc), MEMCACHED_MSGS_STORED_SIZE, counters->c_stored_size, &mc); - bzero(&c, sizeof(c)); + bzero(&c, sizeof(c)); snprintf(buf, MAXBUFSIZE-1, "%s %s %s %s %s %s %s", MEMCACHED_MSGS_RCVD, MEMCACHED_MSGS_VIRUS, MEMCACHED_MSGS_DUPLICATE, MEMCACHED_MSGS_IGNORE, MEMCACHED_MSGS_SIZE, MEMCACHED_MSGS_STORED_SIZE, MEMCACHED_COUNTERS_LAST_UPDATE); @@ -94,7 +94,7 @@ snprintf(buf, SMALLBUFSIZE-1, "%ld", sdata->now); memcached_add(&(data->memc), "set", MEMCACHED_COUNTERS_LAST_UPDATE, buf, strlen(buf), 0, 0); snprintf(buf, SMALLBUFSIZE-1, "UPDATE `%s` SET `rcvd`=%llu, `virus`=%llu, `duplicate`=%llu, `ignore`=%llu, `size`=%llu, `stored_size`=%llu", SQL_COUNTER_TABLE, c.c_rcvd, c.c_virus, c.c_duplicate, c.c_ignore, c.c_size, c.c_stored_size); - + //if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: update counters: %s", sdata->ttmpfile, buf); p_query(sdata, buf); diff --git a/src/digest.c b/src/digest.c index 6f373ad..d814672 100644 --- a/src/digest.c +++ b/src/digest.c @@ -133,4 +133,3 @@ snprintf(digest + i*2, 2*DIGEST_LENGTH, "%02x", md[i]); } - diff --git a/src/extract.c b/src/extract.c index 4488baa..fb42b57 100644 --- a/src/extract.c +++ b/src/extract.c @@ -317,5 +317,3 @@ } - - diff --git a/src/hash.c b/src/hash.c index 5fe19cc..027768b 100644 --- a/src/hash.c +++ b/src/hash.c @@ -163,4 +163,3 @@ return hash; } - diff --git a/src/htmlentities.h b/src/htmlentities.h index ef7e08f..5238936 100644 --- a/src/htmlentities.h +++ b/src/htmlentities.h @@ -285,4 +285,3 @@ #endif /* _HTMLENTITIES_H */ - diff --git a/src/imap.c b/src/imap.c index 2e61141..0af375d 100644 --- a/src/imap.c +++ b/src/imap.c @@ -363,7 +363,7 @@ void send_imap_close(struct data *data){ - char puf[SMALLBUFSIZE]; + char puf[SMALLBUFSIZE]; snprintf(puf, sizeof(puf)-1, "A%d CLOSE\r\n", data->import->seq); write1(data->net, puf, strlen(puf)); @@ -447,7 +447,7 @@ q++; fldrlen = strtol(q, NULL, 10); } else { - + if(fldrlen) { ruf = malloc(strlen(q) * 2 + 1); memset(ruf, 0, strlen(q) * 2 + 1); diff --git a/src/import.c b/src/import.c index fa89b64..4ec7b7e 100644 --- a/src/import.c +++ b/src/import.c @@ -65,7 +65,7 @@ data->import->total_size += sdata->tot_len; - + sdata->delivered = 0; sdata->import = 1; @@ -124,7 +124,7 @@ default: printf("failed to import: %s (id: %s)\n", data->import->filename, sdata->ttmpfile); break; - } + } if(rc != OK && data->import->failed_folder){ p = strrchr(data->import->filename, '/'); diff --git a/src/import.h b/src/import.h index 21e3f08..0fa2a21 100644 --- a/src/import.h +++ b/src/import.h @@ -23,4 +23,3 @@ void send_imap_close(struct data *data); #endif /* _IMPORT_H */ - diff --git a/src/list.c b/src/list.c index 74a7b81..965d48b 100644 --- a/src/list.c +++ b/src/list.c @@ -92,6 +92,3 @@ p = q; } } - - - diff --git a/src/list.h b/src/list.h index 6e0ab6d..56a413c 100644 --- a/src/list.h +++ b/src/list.h @@ -14,4 +14,3 @@ void free_list(struct list *list); #endif /* _LIST_H */ - diff --git a/src/memc.c b/src/memc.c index 0e2a148..c56c4db 100644 --- a/src/memc.c +++ b/src/memc.c @@ -197,7 +197,7 @@ { (void)close(ptr->fd); ptr->fd= -1; - + } return MEMCACHED_FAILURE; @@ -299,7 +299,7 @@ *flags = atoi(p+1); *p = '\0'; - + p = strchr(ptr->result, '\r'); if(!p) return NULL; @@ -372,5 +372,3 @@ return p; } - - diff --git a/src/misc.c b/src/misc.c index 2e10722..cfa1982 100644 --- a/src/misc.c +++ b/src/misc.c @@ -410,28 +410,28 @@ i = SSL_get_error(ssl, ret); if(i == SSL_ERROR_NONE) return 1; - + tv.tv_sec = timeout/1000; tv.tv_usec = 0; FD_ZERO(&fds); - + switch(i){ case SSL_ERROR_WANT_READ: // pause until the socket is readable sock = SSL_get_rfd(ssl); FD_SET(sock, &fds); i = select(sock+1, &fds, 0, 0, &tv); break; - + case SSL_ERROR_WANT_WRITE: // pause until the socket is writeable sock = SSL_get_wfd(ssl); FD_SET(sock, &fds); i = select(sock+1, 0, &fds, 0, &tv); break; - + case SSL_ERROR_ZERO_RETURN: // the sock closed, just return quietly i = 0; break; - + default: // ERROR - unexpected error code i = -1; break; diff --git a/src/mysql.c b/src/mysql.c index 3899c7e..83c93fd 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -104,7 +104,6 @@ bind[i].buffer = sql->sql[i]; bind[i].is_null = 0; - } else { break; } } @@ -222,7 +221,7 @@ return ERR; } - return OK; + return OK; } diff --git a/src/parser.c b/src/parser.c index aa11b88..6b755c4 100644 --- a/src/parser.c +++ b/src/parser.c @@ -259,7 +259,7 @@ p = get_attachment_extractor_by_filename(state->attachments[state->n_attachments].filename); snprintf(state->attachments[state->n_attachments].shorttype, TINYBUFSIZE-1, "%s", p); - + if(strcmp("other", p)){ state->b64fd = open(state->attachments[state->n_attachments].aname, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); state->attachments[state->n_attachments].dumped = 1; @@ -590,7 +590,7 @@ state->message_state = MSG_UNDEF; - return 0; + return 0; } if(boundary_line == 1){ return 0; } diff --git a/src/parser_utils.c b/src/parser_utils.c index 1c77886..0d0a1f4 100644 --- a/src/parser_utils.c +++ b/src/parser_utils.c @@ -246,7 +246,7 @@ } else { tm.tm_min = atoi(r); } - continue; + continue; } } @@ -518,13 +518,13 @@ } if(state->htmltag == 1){ - + if(j == 0 && *s == '!'){ state->skip_html = 1; //printf("skiphtml=1\n"); } - if(state->skip_html == 0){ + if(state->skip_html == 0){ if(*s != '>' && *s != '<' && *s != '"'){ //printf("j=%d/%c", j, *s); html[j] = tolower(*s); @@ -973,7 +973,7 @@ if(strncasecmp(p, "jpg", 3) == 0) return "image,"; if(strncasecmp(p, "jpeg", 4) == 0) return "image,"; if(strncasecmp(p, "tiff", 4) == 0) return "image,"; - } + } } return "other,"; @@ -1055,4 +1055,3 @@ *at_sign = r; } } - diff --git a/src/pileraget.c b/src/pileraget.c index d926c7f..3b780cc 100644 --- a/src/pileraget.c +++ b/src/pileraget.c @@ -57,5 +57,3 @@ return 0; } - - diff --git a/src/pilerconf.c b/src/pilerconf.c index bc9071e..670bb36 100644 --- a/src/pilerconf.c +++ b/src/pilerconf.c @@ -41,7 +41,7 @@ break; - default : + default : break; } } diff --git a/src/pilerexport.c b/src/pilerexport.c index 035cd80..9abd03a 100644 --- a/src/pilerexport.c +++ b/src/pilerexport.c @@ -508,7 +508,7 @@ rc = append_email_to_buffer(&fromdomain, optarg); - break; + break; case 'R' : @@ -519,8 +519,8 @@ rc = append_email_to_buffer(&todomain, optarg); - break; - + break; + case 'a' : startdate = convert_time(optarg, 0, 0, 0); break; @@ -604,5 +604,3 @@ return 0; } - - diff --git a/src/pilerget.c b/src/pilerget.c index 1674014..9adb1bf 100644 --- a/src/pilerget.c +++ b/src/pilerget.c @@ -54,5 +54,3 @@ return 0; } - - diff --git a/src/pilerimport.c b/src/pilerimport.c index 296b93f..eaf7b87 100644 --- a/src/pilerimport.c +++ b/src/pilerimport.c @@ -271,7 +271,7 @@ break; - default : + default : break; } } diff --git a/src/rules.h b/src/rules.h index e965736..bc5fb74 100644 --- a/src/rules.h +++ b/src/rules.h @@ -21,4 +21,3 @@ void clearrules(struct node *xhash[]); #endif /* _RULES_H */ - diff --git a/src/sig.c b/src/sig.c index 6d28b0a..a110169 100644 --- a/src/sig.c +++ b/src/sig.c @@ -56,4 +56,3 @@ return oact.sa_handler; } - diff --git a/src/smtpcodes.h b/src/smtpcodes.h index fac0eaf..ee0d2af 100644 --- a/src/smtpcodes.h +++ b/src/smtpcodes.h @@ -64,4 +64,3 @@ // LMTP responses #define LMTP_RESP_220_BANNER "220 %s LMTP\r\n" - diff --git a/src/store.c b/src/store.c index 2cfc5e4..dc3839a 100644 --- a/src/store.c +++ b/src/store.c @@ -235,5 +235,3 @@ return 0; } - - diff --git a/src/tai.h b/src/tai.h index 07f799d..6b670fd 100644 --- a/src/tai.h +++ b/src/tai.h @@ -26,4 +26,3 @@ void taia_pack(char *s, struct taia *t); #endif /* _TAI_H */ - diff --git a/src/test.c b/src/test.c index b369507..497c77f 100644 --- a/src/test.c +++ b/src/test.c @@ -163,7 +163,7 @@ printf("hdr len: %d\n", sdata.hdr_len); rule = check_against_ruleset(data.archiving_rules, &state, st.st_size, sdata.spam_message); - + printf("body digest: %s\n", sdata.bodydigest); printf("rules check: %s\n", rule);