diff options
author | Tom Tromey <tom@tromey.com> | 2022-06-26 14:17:05 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-07-10 13:02:11 -0600 |
commit | b812967a6033de7c0682a048588397f987ebf55c (patch) | |
tree | e56083302f62e35afd864ecccf9bebbb1539978b /gdb/tracectf.c | |
parent | 940d6baa709ea74b96e16a1cc1afa06ed2218659 (diff) | |
download | gdb-b812967a6033de7c0682a048588397f987ebf55c.zip gdb-b812967a6033de7c0682a048588397f987ebf55c.tar.gz gdb-b812967a6033de7c0682a048588397f987ebf55c.tar.bz2 |
Change 'handle_id' to be a local variable
The global variable 'handle_id' in tracectf.c is only used in a single
function, so change it to be a local variable.
Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/tracectf.c')
-rw-r--r-- | gdb/tracectf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/tracectf.c b/gdb/tracectf.c index c2b5542..0ed2092 100644 --- a/gdb/tracectf.c +++ b/gdb/tracectf.c @@ -855,7 +855,6 @@ public: }; /* The struct pointer for current CTF directory. */ -static int handle_id = -1; static struct bt_context *ctx = NULL; static struct bt_ctf_iter *ctf_iter = NULL; /* The position of the first packet containing trace frame. */ @@ -895,7 +894,7 @@ ctf_open_dir (const char *dirname) ctx = bt_context_create (); if (ctx == NULL) error (_("Unable to create bt_context")); - handle_id = bt_context_add_trace (ctx, dirname, "ctf", NULL, NULL, NULL); + int handle_id = bt_context_add_trace (ctx, dirname, "ctf", NULL, NULL, NULL); if (handle_id < 0) { ctf_destroy (); |