mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-08 08:33:39 +08:00
Wconversion-related cleanup: split pbuf_header(s16_t) into pbuf_add_header(size_t) and pbuf_remove_header(size_t)
The new functions both take size_t as increment/decrement argument instead of s16_t (which needed to be range-checked before conversion everywhere) - in most places, the direction (increment or decrement) is known anyway, so no need to encode it in a sign bit
This commit is contained in:
@@ -282,6 +282,9 @@ void pbuf_realloc(struct pbuf *p, u16_t size);
|
||||
#define pbuf_match_type(p, type) pbuf_match_allocsrc(p, type)
|
||||
u8_t pbuf_header(struct pbuf *p, s16_t header_size);
|
||||
u8_t pbuf_header_force(struct pbuf *p, s16_t header_size);
|
||||
u8_t pbuf_add_header(struct pbuf *p, size_t header_size_increment);
|
||||
u8_t pbuf_add_header_force(struct pbuf *p, size_t header_size_increment);
|
||||
u8_t pbuf_remove_header(struct pbuf *p, size_t header_size);
|
||||
struct pbuf *pbuf_free_header(struct pbuf *q, u16_t size);
|
||||
void pbuf_ref(struct pbuf *p);
|
||||
u8_t pbuf_free(struct pbuf *p);
|
||||
|
||||
Reference in New Issue
Block a user