Skip to content

Commit

Permalink
Update canard.h
Browse files Browse the repository at this point in the history
State that the frame payload pointer may be NULL if the size is zero.
  • Loading branch information
pavel-kirienko authored Mar 8, 2020
1 parent f80aa3c commit b16a86b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libcanard/canard.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ typedef struct
uint32_t extended_can_id;

/// The useful data in the frame. The length value is not to be confused with DLC!
/// If the payload is empty (payload_size = 0), the payload pointer may be NULL.
/// For RX frames: the library does not expect the lifetime of the pointee to extend beyond the point of return
/// from the API function. That is, the pointee can be invalidated immediately after the frame has been processed.
/// For TX frames: the frame and the payload are allocated within the same dynamic memory fragment, so their
Expand Down

0 comments on commit b16a86b

Please sign in to comment.