diff options
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
-rw-r--r-- | scripts/gcc-plugins/randomize_layout_plugin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/gcc-plugins/randomize_layout_plugin.c b/scripts/gcc-plugins/randomize_layout_plugin.c index 6d5bbd31db7f..bd29e4e7a524 100644 --- a/scripts/gcc-plugins/randomize_layout_plugin.c +++ b/scripts/gcc-plugins/randomize_layout_plugin.c | |||
@@ -443,13 +443,13 @@ static int is_pure_ops_struct(const_tree node) | |||
443 | if (node == fieldtype) | 443 | if (node == fieldtype) |
444 | continue; | 444 | continue; |
445 | 445 | ||
446 | if (!is_fptr(fieldtype)) | 446 | if (code == RECORD_TYPE || code == UNION_TYPE) { |
447 | return 0; | 447 | if (!is_pure_ops_struct(fieldtype)) |
448 | 448 | return 0; | |
449 | if (code != RECORD_TYPE && code != UNION_TYPE) | ||
450 | continue; | 449 | continue; |
450 | } | ||
451 | 451 | ||
452 | if (!is_pure_ops_struct(fieldtype)) | 452 | if (!is_fptr(fieldtype)) |
453 | return 0; | 453 | return 0; |
454 | } | 454 | } |
455 | 455 | ||