aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wimaxasncp
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-20 05:59:22 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-20 05:59:22 +0000
commitf92bd64966291dc3c7968d6a1dd7a11f06ba80b3 (patch)
tree3b9ebb5cf5975442a710da59b07d801a02d46637 /plugins/wimaxasncp
parent0df5a9390d41149dfc87440d72e7669ba96748ec (diff)
[-Wmissing-prototypes]
Use explicit casts. svn path=/trunk/; revision=48439
Diffstat (limited to 'plugins/wimaxasncp')
-rw-r--r--plugins/wimaxasncp/wimaxasncp_dict.l14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/wimaxasncp/wimaxasncp_dict.l b/plugins/wimaxasncp/wimaxasncp_dict.l
index b4c273368b..a643275453 100644
--- a/plugins/wimaxasncp/wimaxasncp_dict.l
+++ b/plugins/wimaxasncp/wimaxasncp_dict.l
@@ -195,7 +195,7 @@ since_attr since=\042
<LOADING>{xmlpi_start} BEGIN LOADING_XMLPI;
<LOADING_XMLPI>{whitespace} ;
<LOADING_XMLPI>{entityname} {
- xmlpi = g_malloc(sizeof(wimaxasncp_dict_xmlpi_t));
+ xmlpi = g_new(wimaxasncp_dict_xmlpi_t,1);
xmlpi->name = g_strdup(yytext);
xmlpi->key = NULL;
xmlpi->value = NULL;
@@ -219,7 +219,7 @@ since_attr since=\042
<LOADING>{start_entity} BEGIN ENTITY;
<ENTITY>{entityname} {
- entity_t *e = g_malloc(sizeof(entity_t));
+ entity_t *e = g_new(entity_t,1);
D(("ENTITY: %s\n",yytext));
e->name = g_strdup(yytext);
e->next = ents.next;
@@ -385,7 +385,7 @@ since_attr since=\042
<IN_DICT>{tlv_start} {
D(("tlv_start\n"));
- tlv = g_malloc(sizeof(wimaxasncp_dict_tlv_t));
+ tlv = g_new(wimaxasncp_dict_tlv_t,1);
tlv->type = 0;
tlv->name = NULL;
tlv->description = NULL;
@@ -425,7 +425,7 @@ since_attr since=\042
<IN_TLV>{enum_start} {
D(("enum_start\n"));
- enumitem = g_malloc(sizeof(wimaxasncp_dict_enum_t));
+ enumitem = g_new(wimaxasncp_dict_enum_t,1);
enumitem->name = NULL;
enumitem->code = 0;
enumitem->next = NULL;
@@ -539,11 +539,11 @@ void wimaxasncp_dict_unused(void) {
static void append_to_buffer(const gchar *txt, int len) {
if (strbuf == NULL) {
- read_ptr = write_ptr = strbuf = g_malloc(size_strbuf);
+ read_ptr = write_ptr = strbuf = (gchar *)g_malloc(size_strbuf);
}
if ( (len_strbuf + len + 1) >= size_strbuf ) {
- read_ptr = strbuf = g_realloc(strbuf,size_strbuf *= 2);
+ read_ptr = strbuf = (gchar *)g_realloc(strbuf,size_strbuf *= 2);
}
write_ptr = strbuf + len_strbuf;
@@ -626,7 +626,7 @@ wimaxasncp_dict_t *wimaxasncp_dict_scan(
wimaxasncp_dict_free(dict);
}
- dict = g_malloc(sizeof(wimaxasncp_dict_t));
+ dict = g_new(wimaxasncp_dict_t,1);
dict->tlvs = NULL;
dict->xmlpis = NULL;