aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-multipart.c
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2016-08-22 13:26:14 +0200
committerBalint Reczey <balint@balintreczey.hu>2016-08-22 13:28:24 +0000
commitee0f94aaaec4cc35b463a94df601a83a23f7967e (patch)
tree3acb64754ef8b5141697d00accdb885f7764bd48 /epan/dissectors/packet-multipart.c
parente129aec55870af97224b37ecc7f05416b6b215dd (diff)
Make index_of_char() static again
Change-Id: I1c0d344c50ee5d78dd8247ccfe795ce0cd94aaa2 Reviewed-on: https://code.wireshark.org/review/17230 Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Diffstat (limited to 'epan/dissectors/packet-multipart.c')
-rw-r--r--epan/dissectors/packet-multipart.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/epan/dissectors/packet-multipart.c b/epan/dissectors/packet-multipart.c
index f4297c0880..7b728b9455 100644
--- a/epan/dissectors/packet-multipart.c
+++ b/epan/dissectors/packet-multipart.c
@@ -311,6 +311,25 @@ unfold_and_compact_mime_header(const char *lines, gint *first_colon_offset)
return (ret);
}
+/* Return the index of a given char in the given string,
+ * or -1 if not found.
+ */
+static gint
+index_of_char(const char *str, const char c)
+{
+ gint len = 0;
+ const char *p = str;
+
+ while (*p && *p != c) {
+ p++;
+ len++;
+ }
+
+ if (*p)
+ return len;
+ return -1;
+}
+
/* Retrieve the media information from pinfo->private_data,
* and compute the boundary string and its length.
* Return a pointer to a filled-in multipart_info_t, or NULL on failure.