diff options
Diffstat (limited to 'gdb/c-typeprint.c')
-rw-r--r-- | gdb/c-typeprint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 7591317..bf87511 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -514,7 +514,7 @@ c_type_print_base (type, stream, show, level) possible that we should have a better way of distinguising tag names from typedef'd names. (e.g. a new tagname field in the struct type). */ - if (strncmp (name, "struct ", 7) == 0) + if (name != NULL && strncmp (name, "struct ", 7) == 0) { fputs_filtered (name + 7, stream); fputs_filtered (" ", stream); @@ -544,7 +544,7 @@ c_type_print_base (type, stream, show, level) possible that we should have a better way of distinguising tag names from typedef'd names. (e.g. a new tagname field in the struct type). */ - if (strncmp (name, "union ", 6) == 0) + if (name != NULL && strncmp (name, "union ", 6) == 0) { fputs_filtered (name + 6, stream); fputs_filtered (" ", stream); |