Message ID | 20220602150834.643745-2-bruce.richardson@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Thomas Monjalon |
Headers | |
Series | clean up zero-length arrays | |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/iol-testing | fail | build patch failure |
Commit Message
diff --git a/devtools/cocci/zero_length_array.cocci b/devtools/cocci/zero_length_array.cocci new file mode 100644 index 0000000000..de8783bc7a --- /dev/null +++ b/devtools/cocci/zero_length_array.cocci @@ -0,0 +1,21 @@ +// Replace zero-length array members with [] +@@ +identifier st, member, arr; +type T1, T2; +@@ +struct st { + ... + T1 member; +- T2 arr[0]; ++ T2 arr[]; +}; +@@ +identifier st, member, arr, id; +type T1, T2; +@@ +struct st { + ... + T1 member; +- T2 arr[0]; ++ T2 arr[]; +} id;