Skip to content

Commit

Permalink
dd: fix for clang analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh committed Jul 30, 2024
1 parent 2f73e19 commit f0231f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dd/putbit.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ int putbit_write(struct putbit *pb, unsigned count, unsigned val)

for (unsigned i=0; i<count; i++) {

unsigned bit = (val >> (count-i-1)) & 0x1;
unsigned shift = count-i-1;
unsigned bit = (val >> shift) & 0x1;

int err = putbit_one(pb, bit);
if (err)
Expand Down

0 comments on commit f0231f2

Please sign in to comment.