mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:10:12 +01:00
Fixed signed vs. unsigned comparisons
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
cb4b65a840
commit
2d0beab92a
10
src/defs.h
10
src/defs.h
@ -174,8 +174,8 @@ struct parser_state {
|
||||
int content_type_is_set;
|
||||
int pushed_pointer;
|
||||
int saved_size;
|
||||
int writebufpos;
|
||||
int abufpos;
|
||||
unsigned int writebufpos;
|
||||
unsigned int abufpos;
|
||||
char attachedfile[RND_STR_LEN+SMALLBUFSIZE];
|
||||
char message_id[SMALLBUFSIZE];
|
||||
char message_id_hash[2*DIGEST_LENGTH+1];
|
||||
@ -205,9 +205,9 @@ struct parser_state {
|
||||
char b_from[SMALLBUFSIZE], b_from_domain[SMALLBUFSIZE], b_to[MAXBUFSIZE], b_to_domain[SMALLBUFSIZE], b_subject[MAXBUFSIZE], b_body[BIGBUFSIZE];
|
||||
char b_journal_to[MAXBUFSIZE];
|
||||
|
||||
int bodylen;
|
||||
int tolen;
|
||||
int todomainlen;
|
||||
unsigned int bodylen;
|
||||
unsigned int tolen;
|
||||
unsigned int todomainlen;
|
||||
int journaltolen;
|
||||
|
||||
int retention;
|
||||
|
@ -41,7 +41,7 @@ int remove_xml(char *src, char *dest, int destlen, int *html){
|
||||
#ifdef HAVE_ZIP
|
||||
int extract_opendocument(struct session_data *sdata, struct parser_state *state, char *filename, char *prefix){
|
||||
int errorp, i=0, len=0, html=0;
|
||||
int len2;
|
||||
unsigned int len2;
|
||||
char buf[4*MAXBUFSIZE], puf[4*MAXBUFSIZE];
|
||||
struct zip *z;
|
||||
struct zip_stat sb;
|
||||
@ -206,7 +206,8 @@ void kill_helper(){
|
||||
|
||||
|
||||
void extract_attachment_content(struct session_data *sdata, struct parser_state *state, char *filename, char *type, int *rec, struct config *cfg){
|
||||
int link[2], n;
|
||||
int link[2];
|
||||
ssize_t n;
|
||||
pid_t pid;
|
||||
char outbuf[MAXBUFSIZE];
|
||||
|
||||
|
@ -101,7 +101,8 @@ int countCharacterInBuffer(char *p, char c){
|
||||
|
||||
|
||||
void replaceCharacterInBuffer(char *p, char from, char to){
|
||||
int i, k=0;
|
||||
size_t i;
|
||||
int k=0;
|
||||
|
||||
for(i=0; i<strlen(p); i++){
|
||||
if(p[i] == from){
|
||||
|
@ -139,7 +139,7 @@ void storno_attachment(struct parser_state *state){
|
||||
}
|
||||
|
||||
|
||||
int parse_line(char *buf, struct parser_state *state, struct session_data *sdata, int take_into_pieces, char *writebuffer, int writebuffersize, char *abuffer, int abuffersize, struct data *data, struct config *cfg){
|
||||
int parse_line(char *buf, struct parser_state *state, struct session_data *sdata, int take_into_pieces, char *writebuffer, unsigned int writebuffersize, char *abuffer, unsigned int abuffersize, struct data *data, struct config *cfg){
|
||||
char *p, *q, puf[SMALLBUFSIZE];
|
||||
unsigned char b64buffer[MAXBUFSIZE];
|
||||
char tmpbuf[MAXBUFSIZE];
|
||||
@ -741,7 +741,7 @@ int parse_line(char *buf, struct parser_state *state, struct session_data *sdata
|
||||
}
|
||||
|
||||
}
|
||||
else if(state->message_state == MSG_BODY && len >= cfg->min_word_len && state->bodylen < BIGBUFSIZE-len-1){
|
||||
else if(state->message_state == MSG_BODY && len >= (unsigned int)(cfg->min_word_len) && state->bodylen < BIGBUFSIZE-len-1){
|
||||
// 99% of email addresses are longer than 8 characters
|
||||
if(len >= MIN_EMAIL_ADDRESS_LEN && does_it_seem_like_an_email_address(puf)){
|
||||
fix_email_address_for_sphinx(puf);
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
struct parser_state parse_message(struct session_data *sdata, int take_into_pieces, struct data *data, struct config *cfg);
|
||||
void post_parse(struct session_data *sdata, struct parser_state *state, struct config *cfg);
|
||||
int parse_line(char *buf, struct parser_state *state, struct session_data *sdata, int take_into_pieces, char *writebuffer, int writebuffersize, char *abuffer, int abuffersize, struct data *data, struct config *cfg);
|
||||
int parse_line(char *buf, struct parser_state *state, struct session_data *sdata, int take_into_pieces, char *writebuffer, unsigned int writebuffersize, char *abuffer, unsigned int abuffersize, struct data *data, struct config *cfg);
|
||||
|
||||
void init_state(struct parser_state *state);
|
||||
time_t parse_date_header(char *s);
|
||||
|
Loading…
Reference in New Issue
Block a user