Misc tweaks to packet-http-urlencoded.c
authorEvan Huus <eapache@gmail.com>
Mon, 17 Jun 2013 14:18:23 +0000 (14:18 -0000)
committerEvan Huus <eapache@gmail.com>
Mon, 17 Jun 2013 14:18:23 +0000 (14:18 -0000)
- add modelines
- convert emem to wmem
- add cast to satisfy my version of GCC

svn path=/trunk/; revision=49982

epan/dissectors/packet-http-urlencoded.c

index 8195113297141803c4979e502693c34a8ba126f7..6749fcde2ebc4af97eac48e863db5ace9aed8e70 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <epan/packet.h>
 #include <epan/strutil.h>
+#include <epan/wmem/wmem.h>
 
 static gint proto_urlencoded = -1;
 
@@ -83,7 +84,7 @@ get_form_key_value(tvbuff_t *tvb, char **ptr, int offset, char stop)
                offset++;
        }
 
-       *ptr = tmp = ep_alloc(len + 1);
+       *ptr = tmp = (char*)wmem_alloc(wmem_packet_scope(), len + 1);
        tmp[len] = '\0';
 
        len = 0;
@@ -217,3 +218,16 @@ proto_reg_handoff_http_urlencoded(void)
 
        dissector_add_string("media_type", "application/x-www-form-urlencoded", form_urlencoded_handle);
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */