History

net: skbuff: disambiguate argument and member for skb_list_walk_safe helper

This worked before, because we made all callers name their next pointer "next". But in trying to be more "drop-in" ready, the silliness here is revealed. This commit fixes the problem by making the macro argument and the member use different names.

Jason A. Donenfeld committed 6 years ago

Commit 5eee7bd1 parent ec22ab01 file · +3 −3Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/skbuff.h+3−3
@@ -1479,9 +1479,9 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) · 1478 unmodified lines
1479}1479}
1480 1480
1481/* Iterate through singly-linked GSO fragments of an skb. */1481/* Iterate through singly-linked GSO fragments of an skb. */
1482#define skb_list_walk_safe(first, skb, next) \1482#define skb_list_walk_safe(first, skb, next_skb) \
1483 for ((skb) = (first), (next) = (skb) ? (skb)->next : NULL; (skb); \1483 for ((skb) = (first), (next_skb) = (skb) ? (skb)->next : NULL; (skb); \
1484 (skb) = (next), (next) = (skb) ? (skb)->next : NULL)1484 (skb) = (next_skb), (next_skb) = (skb) ? (skb)->next : NULL)
1485 1485
1486static inline void skb_list_del_init(struct sk_buff *skb)1486static inline void skb_list_del_init(struct sk_buff *skb)
1487{1487{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t