Skip to content

Commit

Permalink
Merge pull request FRRouting#17104 from opensourcerouting/frr-format-…
Browse files Browse the repository at this point in the history
…array-crash

tools/gcc-plugins: don't crash on array parameters
  • Loading branch information
donaldsharp authored Oct 15, 2024
2 parents 0aef4e4 + 070ce19 commit 24296c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/gcc-plugins/frr-format.c
Original file line number Diff line number Diff line change
Expand Up @@ -2685,7 +2685,8 @@ tree type_normalize (tree type, tree *cousin, tree target = NULL)
{
while (1)
{
if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == POINTER_TYPE)
if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == POINTER_TYPE
|| TREE_CODE (type) == ARRAY_TYPE)
return type;
if (target)
/* Strip off any "const" etc. */
Expand Down

0 comments on commit 24296c6

Please sign in to comment.