zephyr/net
Johan Hedberg 27fc467e74 net: buf: Allow NULL head pointer when inserting to frag list
To avoid extra logic in code that creates net_buf fragment lists, make
it possible to pass a NULL pointer as the head net_buf when there are
no previous buffers. Before this change the code would look like this:

	if (head) {
		net_buf_frag_add(head, buf);
	} else {
		head = net_buf_ref(buf);
	}

After the patch the code can simply do:

	head = net_buf_frag_add(head, buf);

This will then do the right thing regardless if head is NULL or
non-NULL.

Change-Id: I300394242e2e243ed3839b25629ec816dd98c148
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-09-30 15:07:32 +00:00
..
bluetooth Bluetooth: HCI: Fix updating RPA too early 2016-09-15 14:36:09 +00:00
ip net: Set uIP context on newly allocated buffers immediately. 2016-09-22 12:00:24 +00:00
Kconfig
Makefile net/yaip: revert merge 2016-07-22 04:43:09 +00:00
buf.c net: buf: Allow NULL head pointer when inserting to frag list 2016-09-30 15:07:32 +00:00