Skip to content

Commit

Permalink
Initialise variable instead of reassigning
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisamiga committed Jan 11, 2024
1 parent 24dcabc commit e731647
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,11 @@ struct Values {
};

struct Values correctFormat(ULONG size, int format){
int tempformat = format;
ULONG tempSize = size;
while(tempSize / 1024 > 0) {
tempSize /= 1024;
tempformat++;
struct Values values = {size, format};
while(values.value / 1024 > 0) {
values.value /= 1024;
values.format++;
}

struct Values values;
values.value = tempSize;
values.format = tempformat;
return values;
}

Expand Down

0 comments on commit e731647

Please sign in to comment.