mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Merge pull request #346 from pallas/avoid-unused-variable-warning
radiotap: avoid unused variable warning
This commit is contained in:
@@ -131,7 +131,7 @@ struct RadioTapFlags {
|
|||||||
} TINS_END_PACK;
|
} TINS_END_PACK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void align_buffer(const uint8_t* buffer_start, const uint8_t*& buffer, uint32_t size, size_t n) {
|
void align_buffer(const uint8_t* buffer_start, const uint8_t*& buffer, size_t n) {
|
||||||
uint32_t offset = (buffer - buffer_start) & (n - 1);
|
uint32_t offset = (buffer - buffer_start) & (n - 1);
|
||||||
if (offset) {
|
if (offset) {
|
||||||
offset = n - offset;
|
offset = n - offset;
|
||||||
@@ -278,7 +278,7 @@ bool RadioTapParser::advance_to_next_field() {
|
|||||||
if (current_bit_ < MAX_RADIOTAP_FIELD) {
|
if (current_bit_ < MAX_RADIOTAP_FIELD) {
|
||||||
const uint8_t* radiotap_start = start_ - sizeof(uint32_t);
|
const uint8_t* radiotap_start = start_ - sizeof(uint32_t);
|
||||||
// Skip and align the buffer
|
// Skip and align the buffer
|
||||||
align_buffer(radiotap_start, current_ptr_, end_ - radiotap_start,
|
align_buffer(radiotap_start, current_ptr_,
|
||||||
RADIOTAP_METADATA[current_bit_].alignment);
|
RADIOTAP_METADATA[current_bit_].alignment);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user