Skip to content

Commit

Permalink
minor: Fix shadowed declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt committed Nov 18, 2024
1 parent 0acfa81 commit 8f7eddc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/devices/flex.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "fatal.h"
#include <stdlib.h>

static inline int bit(const uint8_t *bytes, unsigned bit)
static inline int bit(const uint8_t *bytes, unsigned b)
{
return bytes[bit >> 3] >> (7 - (bit & 7)) & 1;
return bytes[b >> 3] >> (7 - (b & 7)) & 1;
}

/// extract all mask bits skipping unmasked bits of a number up to 32/64 bits
Expand Down
4 changes: 2 additions & 2 deletions src/devices/ge_coloreffects.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Previous work decoding this device:
#include "decoder.h"

// Helper to access single bit (copied from bitbuffer.c)
static inline int bit(const uint8_t *bytes, unsigned bit)
static inline int bit(const uint8_t *bytes, unsigned b)
{
return bytes[bit >> 3] >> (7 - (bit & 7)) & 1;
return bytes[b >> 3] >> (7 - (b & 7)) & 1;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/devices/norgo.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ static uint16_t const checksum_taps[] = {
static uint16_t next_mask(uint32_t mask)
{
uint16_t i;
uint16_t next_mask;
uint16_t n_mask;

next_mask = mask >> 1;
n_mask = mask >> 1;
for (i = 0; i < 15; i++) {
if (mask & (1 << i)) {
next_mask ^= checksum_taps[i];
n_mask ^= checksum_taps[i];
}
}
return next_mask;
return n_mask;
}

static uint8_t calc_checksum(uint8_t *data, uint8_t datalen)
Expand Down

0 comments on commit 8f7eddc

Please sign in to comment.