public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: initialize interp::next
@ 2023-03-07 21:30 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2023-03-07 21:30 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4d2e669ca92cbd9ebecfafdce4685bc31241015a
commit 4d2e669ca92cbd9ebecfafdce4685bc31241015a
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Thu Mar 2 15:32:24 2023 -0500
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>
Diff:
---
gdb/interps.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/interps.h b/gdb/interps.h
index 62f37951dde..29248093c67 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-07 21:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 21:30 [binutils-gdb] gdb: initialize interp::next Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).