aboutsummaryrefslogtreecommitdiff
path: root/gdb/interps.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-03-02 15:32:24 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2023-03-07 16:30:14 -0500
commit4d2e669ca92cbd9ebecfafdce4685bc31241015a (patch)
tree2dedd70e4e8a4a3c96c04289c3c9a6968118213e /gdb/interps.h
parent5a8ac2cb96cdb6c470a2ad4dec6442a21aa7dae9 (diff)
downloadgdb-4d2e669ca92cbd9ebecfafdce4685bc31241015a.zip
gdb-4d2e669ca92cbd9ebecfafdce4685bc31241015a.tar.gz
gdb-4d2e669ca92cbd9ebecfafdce4685bc31241015a.tar.bz2
gdb: initialize interp::next
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 Reviewed-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/interps.h')
-rw-r--r--gdb/interps.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/interps.h b/gdb/interps.h
index 62f3795..2924809 100644
--- a/gdb/interps.h
+++ b/gdb/interps.h
@@ -87,7 +87,7 @@ private:
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;