Skip to content

Commit

Permalink
instrument functions: Reduce the scope of a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fxlb committed Mar 2, 2022
1 parent e9f9fbf commit 9ff9f78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion instrument-functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static void print_debug(void *this_fn, void *call_site, action_type action)
static int print_only_global;
symbol_info syminfo;
struct stat statbuf;
int i, found;
int i;

if (!stat(ND_FILE_FLAG_OFF, &statbuf))
return;
Expand Down Expand Up @@ -143,6 +143,8 @@ static void print_debug(void *this_fn, void *call_site, action_type action)
}

if (print_only_global) {
int found;

i = 0;
found = 0;
while (i < symcount && !found) {
Expand Down

0 comments on commit 9ff9f78

Please sign in to comment.