Browse Source

codacy

mcspr-patch-1
Maxim Prokhorov 3 years ago
parent
commit
83e22b09cd
2 changed files with 4 additions and 4 deletions
  1. +2
    -0
      code/espurna/rfbridge.cpp
  2. +2
    -4
      code/espurna/utils.cpp

+ 2
- 0
code/espurna/rfbridge.cpp View File

@ -77,7 +77,9 @@ struct RfbRelayMatch {
};
struct RfbLearn {
#if RFB_PROVIDER == RFB_PROVIDER_RCSWITCH
unsigned long ts;
#endif
unsigned char id;
bool status;
};


+ 2
- 4
code/espurna/utils.cpp View File

@ -831,11 +831,9 @@ size_t hexDecode(const char* in, size_t in_size, uint8_t* out, size_t out_size)
size_t index = 0;
size_t out_index = 0;
uint8_t lhs, rhs;
while (index < in_size) {
lhs = char2byte(in[index]) << 4;
rhs = char2byte(in[index + 1]);
const uint8_t lhs = char2byte(in[index]) << 4;
const uint8_t rhs = char2byte(in[index + 1]);
if (lhs || rhs) {
out[out_index++] = lhs | rhs;
index += 2;


Loading…
Cancel
Save