From 01a92a4a16d820656c97eb05fd7c1efa5743748c Mon Sep 17 00:00:00 2001 From: SJ Date: Fri, 12 Jul 2013 23:01:12 +0200 Subject: [PATCH] minor code cleanup in message.c --- src/message.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/message.c b/src/message.c index d4cfbc60..eecbd4af 100644 --- a/src/message.c +++ b/src/message.c @@ -246,7 +246,7 @@ void remove_stripped_attachments(struct _state *state){ int process_message(struct session_data *sdata, struct _state *state, struct __data *data, struct __config *cfg){ - int i, rc; + int rc; uint64 id=0; /* discard if existing message_id */ @@ -270,9 +270,7 @@ int process_message(struct session_data *sdata, struct _state *state, struct __d if(state->n_attachments > 0){ rc = store_attachments(sdata, state, data, cfg); - for(i=1; i<=state->n_attachments; i++){ - unlink(state->attachments[i].internalname); - } + remove_stripped_attachments(state); if(rc) return ERR; }