]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
app-layer-stmp: simplify code
authorEric Leblond <eric@regit.org>
Fri, 24 Apr 2015 11:25:41 +0000 (13:25 +0200)
committerEric Leblond <eric@regit.org>
Fri, 2 Oct 2015 20:57:58 +0000 (22:57 +0200)
Delete a only used once goto to a point where we only do a return.

src/app-layer-smtp.c

index db2dd651ca3660c1e0b3162d1e239188899e5782..ed034d4ed683a55b0243ce050eecb1a76bc7369d 100644 (file)
@@ -369,7 +369,7 @@ int SMTPProcessDataChunk(const uint8_t *chunk, uint32_t len,
             if (smtp_state->files_ts == NULL) {
                 ret = MIME_DEC_ERR_MEM;
                 SCLogError(SC_ERR_MEM_ALLOC, "Could not create file container");
-                goto end;
+                SCReturnInt(ret);
             }
         }
         files = smtp_state->files_ts;
@@ -451,7 +451,7 @@ int SMTPProcessDataChunk(const uint8_t *chunk, uint32_t len,
     if (files != NULL) {
         FilePrune(files);
     }
-end:
+
     SCReturnInt(ret);
 }