[Listener] Add an assert, improve 2 comments
This commit is contained in:
parent
0b2835c744
commit
ef2b4e9e58
|
@ -162,6 +162,8 @@ enum {MODE_ACTIVE = 'a', MODE_PASSIVE = 'p', MODE_MIXED = 'm'} ;
|
|||
* Returns the number of bytes needed to jump after a (radiotap) field of
|
||||
* length 'FIELD_LEN' that should sit at the position 'OFFSET' in the
|
||||
* buffer, taking into account alignment considerations.
|
||||
* Warning: do *not* pass an incremented number as FIELD_LEN (e.g.
|
||||
* field_len++ or ++field_len). This shouldn't normally be useful anyway.
|
||||
*/
|
||||
#define SKIP_FIELD(OFFSET, FIELD_LEN) \
|
||||
((FIELD_LEN) + nat_align((OFFSET), (FIELD_LEN)))
|
||||
|
|
|
@ -1698,7 +1698,8 @@ void send_autocalibration_request()
|
|||
|
||||
/*
|
||||
* Creates the calibration packet to send.
|
||||
* The packet must be freed by the calling function.
|
||||
* 'packet' must not be NULL. '*packet' must be freed by the calling
|
||||
* function.
|
||||
* Returns the size of the packet.
|
||||
* In case of error, 0 is returned and *packet is not updated.
|
||||
*/
|
||||
|
@ -1714,6 +1715,8 @@ uint_fast16_t make_packet(uint8_t **packet)
|
|||
my_position_z = owl_htonf(GET_MY_POSITION_Z()) ;
|
||||
uint16_t npkt ;
|
||||
|
||||
assert(packet) ;
|
||||
|
||||
owl_timestamp_now(&request_time) ;
|
||||
|
||||
if (VERBOSE_CHATTERBOX)
|
||||
|
|
Loading…
Reference in New Issue