1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

radiotap: remove unused variable

This commit is contained in:
Derrick Lyndon Pallas
2019-04-24 02:23:17 +00:00
parent a926b75224
commit 7bc4d38470

View File

@@ -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;
} }