diff options
| author | Ryo Nakamura <upa@haeena.net> | 2022-11-18 14:42:23 +0900 |
|---|---|---|
| committer | Ryo Nakamura <upa@haeena.net> | 2022-11-18 20:20:19 +0900 |
| commit | 5e7aa774cafef00e2ec911ec978f07acedeadcae (patch) | |
| tree | 71b082e74a365aba23552e73c140a7d912b9b581 /src/list.h | |
| parent | b8d58b1fba1d29d36b98dd19e544ff3002b286e4 (diff) | |
fix when copy multiple sources and various tiny fixes
* when copying multiple sources, target must be directory
* add multi-src copy test and parametrize src/dst prefixes
* cleanup REAMDE (s/sessions/connections/g)
* make error output in copy functions simple
Diffstat (limited to 'src/list.h')
| -rw-r--r-- | src/list.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -514,4 +514,19 @@ static inline void hlist_add_after(struct hlist_node *n, pos = n) +/** + * list_count - return length of list + * @head the head for your list. + */ +static inline int list_count(struct list_head *head) +{ + int n = 0; + struct list_head *p; + + list_for_each(p, head) n++; + return n; +} + + #endif + |
