[3/3] gdb: initialize interp::next
Commit Message
From: Simon Marchi <simon.marchi@polymtl.ca>
This field is never initialized, it seems to me like it would be a good
idea to initialize it to nullptr to avoid bad surprises.
Change-Id: I8c04319d564f5d385d8bf0acee758f6ce28b4447
---
gdb/interps.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Simon> This field is never initialized, it seems to me like it would be a good
Simon> idea to initialize it to nullptr to avoid bad surprises.
Seems totally fine.
Reviewed-By: Tom Tromey <tom@tromey.com>
Tom
@@ -87,7 +87,7 @@ class interp
public:
/* Interpreters are stored in a linked list, this is the next
one... */
- struct interp *next;
+ interp *next = nullptr;
/* Has the init method been run? */
bool inited = false;