intel: decoder: simplify creation of struct when 0-allocated
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 23 Sep 2017 23:43:09 +0000 (00:43 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 1 Nov 2017 13:49:12 +0000 (13:49 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
src/intel/common/gen_decoder.c

index f3b2194da9618087554772b2109b2cf85222c92a..5b234d254a7dca8f1c4a7a4a00157862fbb94b76 100644 (file)
@@ -161,8 +161,6 @@ create_group(struct parser_context *ctx,
       group->name = ralloc_strdup(group, name);
 
    group->spec = ctx->spec;
-   group->group_offset = 0;
-   group->group_count = 0;
    group->variable = false;
 
    if (parent) {
@@ -186,8 +184,6 @@ create_enum(struct parser_context *ctx, const char *name, const char **atts)
    if (name)
       e->name = ralloc_strdup(e, name);
 
-   e->nvalues = 0;
-
    return e;
 }