Skip to content

Commit

Permalink
oss-fuzz: Fix miniflow_target.c.
Browse files Browse the repository at this point in the history
Clang reports:
tests/oss-fuzz/miniflow_target.c:209:26: error: suggest braces around \
initialization of subobject
      [-Werror,-Wmissing-braces]
          struct flow flow2 = {0};

Fix it by using memset.

Cc: Bhargava Shastry <[email protected]>
Reviewed-by: Yifeng Sun <[email protected]>
Signed-off-by: William Tu <[email protected]>
  • Loading branch information
williamtu committed May 14, 2020
1 parent 1740aaf commit fae687c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/oss-fuzz/miniflow_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ test_minimask_combine(struct flow *flow)
struct minimask minicombined;
uint64_t storage[FLOW_U64S];
} m;
struct flow flow2 = {0};
struct flow flow2;

memset(&flow2, 0, sizeof flow2);
mask.masks = *flow;
minimask = minimask_create(&mask);

Expand Down

0 comments on commit fae687c

Please sign in to comment.