Skip to content

Commit

Permalink
Reduce scope of 'len' variable in list_gp.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Vasudeo Desai committed Jul 5, 2024
1 parent d528aa9 commit 736111c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/imagery/list_gp.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int I_list_group(const char *group, const struct Ref *ref, FILE *fd)
{
char buf[80];
int i;
int len, tot_len;
int tot_len;
int max;

if (ref->nfiles <= 0) {
Expand All @@ -36,6 +36,7 @@ int I_list_group(const char *group, const struct Ref *ref, FILE *fd)
}
max = 0;
for (i = 0; i < ref->nfiles; i++) {
int len;
I__list_group_name_fit(buf, ref->file[i].name, ref->file[i].mapset);
len = strlen(buf) + 4;
if (len > max)
Expand Down

0 comments on commit 736111c

Please sign in to comment.