summaryrefslogtreecommitdiff
path: root/plugins/wimaxasncp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/wimaxasncp')
-rw-r--r--plugins/wimaxasncp/packet-wimaxasncp.c26
-rw-r--r--plugins/wimaxasncp/wimaxasncp_dict.l8
2 files changed, 11 insertions, 23 deletions
diff --git a/plugins/wimaxasncp/packet-wimaxasncp.c b/plugins/wimaxasncp/packet-wimaxasncp.c
index b56102e571..f907b078c8 100644
--- a/plugins/wimaxasncp/packet-wimaxasncp.c
+++ b/plugins/wimaxasncp/packet-wimaxasncp.c
@@ -1972,7 +1972,7 @@ static guint dissect_wimaxasncp_backend(
guint offset = 0;
guint16 ui16;
guint32 ui32;
- guint8 *pmsid;
+ const guint8 *pmsid;
guint16 tid = 0;
gboolean dbit_show;
@@ -2518,7 +2518,7 @@ static void add_tlv_reg_info(
{
char *name;
char *abbrev;
- char *blurb;
+ const char *blurb;
/* ------------------------------------------------------------------------
* add root reg info
@@ -2627,32 +2627,25 @@ static void add_tlv_reg_info(
break;
case WIMAXASNCP_TLV_ID:
- g_free(name);
g_free(abbrev);
- name = "IPv4 Address";
-
abbrev = alnumerize(
g_strdup_printf("wimaxasncp.tlv.%s.ipv4_value", tlv->name));
add_reg_info(
- &tlv->hf_ipv4, name, abbrev, FT_IPv4, BASE_NONE, blurb);
-
- name = "IPv6 Address";
+ &tlv->hf_ipv4, "IPv4 Address", abbrev, FT_IPv4, BASE_NONE, blurb);
abbrev = alnumerize(
g_strdup_printf("wimaxasncp.tlv.%s.ipv6_value", tlv->name));
add_reg_info(
- &tlv->hf_ipv6, name, abbrev, FT_IPv6, BASE_NONE, blurb);
-
- name = "BS ID";
+ &tlv->hf_ipv6, "IPv6 Address", abbrev, FT_IPv6, BASE_NONE, blurb);
abbrev = alnumerize(
g_strdup_printf("wimaxasncp.tlv.%s.bsid_value", tlv->name));
add_reg_info(
- &tlv->hf_bsid, name, abbrev, FT_ETHER, BASE_NONE, blurb);
+ &tlv->hf_bsid, "BS ID", abbrev, FT_ETHER, BASE_NONE, blurb);
break;
@@ -2687,24 +2680,19 @@ static void add_tlv_reg_info(
break;
case WIMAXASNCP_TLV_IP_ADDRESS:
- g_free(name);
g_free(abbrev);
- name = "IPv4 Address";
-
abbrev = alnumerize(
g_strdup_printf("wimaxasncp.tlv.%s.ipv4_value", tlv->name));
add_reg_info(
- &tlv->hf_ipv4, name, abbrev, FT_IPv4, BASE_NONE, blurb);
-
- name = "IPv6 Address";
+ &tlv->hf_ipv4, "IPv4 Address", abbrev, FT_IPv4, BASE_NONE, blurb);
abbrev = alnumerize(
g_strdup_printf("wimaxasncp.tlv.%s.ipv6_value", tlv->name));
add_reg_info(
- &tlv->hf_ipv6, name, abbrev, FT_IPv6, BASE_NONE, blurb);
+ &tlv->hf_ipv6, "IPv6 Address", abbrev, FT_IPv6, BASE_NONE, blurb);
break;
diff --git a/plugins/wimaxasncp/wimaxasncp_dict.l b/plugins/wimaxasncp/wimaxasncp_dict.l
index 71259ef51c..9c55a79d97 100644
--- a/plugins/wimaxasncp/wimaxasncp_dict.l
+++ b/plugins/wimaxasncp/wimaxasncp_dict.l
@@ -85,7 +85,7 @@ typedef struct entity_t {
#define MAX_INCLUDE_DEPTH 10
#define YY_INPUT(buf,result,max_size) { result = current_yyinput(buf,max_size); }
#define ECHO
-#define APPEND(txt,len) append_to_buffer(txt,len)
+#define APPEND(txt,len) append_to_buffer(txt,(int)len)
static entity_t ents;
static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
@@ -108,7 +108,7 @@ static gint16 *attr_uint16;
static guint wimaxasncp_bits(guint bits, char *n);
static gint wimaxasncp_decode_type(const gchar *name);
static void wimaxasncp_dict_debug(const gchar *fmt, ...);
-static void append_to_buffer(gchar *txt, int len);
+static void append_to_buffer(const gchar *txt, int len);
static FILE *wimaxasncp_dict_open(const gchar*, const gchar*);
static GString *dict_error = NULL;
@@ -313,7 +313,7 @@ since_attr since=\042
}
<GET_UINT_ATTR>{number} {
- *attr_uint = strtoul(yytext,NULL,0);
+ *attr_uint = (guint)strtoul(yytext,NULL,0);
D(("%s\n",yytext););
attr_uint = NULL;
BEGIN END_ATTR;
@@ -531,7 +531,7 @@ void wimaxasncp_dict_unused(void) {
yy_top_state();
}
-static void append_to_buffer(gchar *txt, int len) {
+static void append_to_buffer(const gchar *txt, int len) {
if (strbuf == NULL) {
read_ptr = write_ptr = strbuf = g_malloc(size_strbuf);