mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-21 01:07:07 +08:00
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>
This commit is contained in:
@ -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 ();
|
||||
|
Reference in New Issue
Block a user