aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2008-11-20 20:16:07 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2008-11-20 20:16:07 +0000
commitfe42d6af0a1ca818452ba11c42e83bdbb1054a51 (patch)
tree18f37b91bd7805b5f5eb6daf5ba717ec3c3e99d4 /wiretap/wtap.c
parente326300ef3f5b0284e0ada24344f130cdfd3e7f7 (diff)
From yami:
The code in wiretap/wtap.c is not right. Because g_array_append_val should accept a value of type 'struct encap_type_info' rather than a pointer to this type. svn path=/trunk/; revision=26816
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r--wiretap/wtap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index dbac7cd286..e31e58bbe2 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -354,8 +354,8 @@ static struct encap_type_info encap_table_base[] = {
/* WTAP_ENCAP_JUNIPER_GGSN */
{ "Juniper GGSN", "juniper-ggsn" },
- /* WTAP_ENCAP_LINUX_LAPD */
- { "LAPD", "lapd" },
+ /* WTAP_ENCAP_LINUX_LAPD */
+ { "LAPD", "lapd" },
/* WTAP_ENCAP_CATAPULT_DCT2000 */
{ "Catapult DCT2000", "dct2000" },
@@ -455,15 +455,16 @@ int wtap_get_num_encap_types(void) {
int wtap_register_encap_type(char* name, char* short_name) {
- struct encap_type_info* e = g_malloc(sizeof(struct encap_type_info));
+ struct encap_type_info e;
wtap_init_encap_types();
- e->name = g_strdup(name);
- e->short_name = g_strdup(short_name);
+ e.name = g_strdup(name);
+ e.short_name = g_strdup(short_name);
g_array_append_val(encap_table_arr,e);
encap_table = (void*)encap_table_arr->data;
+
return wtap_num_encap_types++;
}