]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: initialize interp::next
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 2 Mar 2023 20:32:24 +0000 (15:32 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 7 Mar 2023 21:30:14 +0000 (16:30 -0500)
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>
gdb/interps.h

index 62f37951ddea36bb64d4e7e3be557d3d4293ed54..29248093c67108a6c5ee3fa97d8be79c60844086 100644 (file)
@@ -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;