diff options
author | Pali Rohár <pali@kernel.org> | 2023-04-18 01:53:55 +0200 |
---|---|---|
committer | Pali Rohár <pali@kernel.org> | 2023-04-29 14:22:39 +0200 |
commit | 5b0411aa38c04782fd99469263ae3f04eb79ca34 (patch) | |
tree | 026d282177b9475cbbc98d5307eeebd087cf14e6 | |
parent | c3c2e3cb3e5aa9882c5a7a76a482565990532e81 (diff) | |
download | pciutils-5b0411aa38c04782fd99469263ae3f04eb79ca34.tar.gz |
ls-tree: Rename struct bridge member next to prev
It refers to the previous value in linked-list, not to the next.
-rw-r--r-- | ls-tree.c | 8 | ||||
-rw-r--r-- | lspci.h | 2 |
2 files changed, 5 insertions, 5 deletions
@@ -76,7 +76,7 @@ insert_dev(struct device *d, struct bridge *b) if (!bus && ! (bus = find_bus(b, p->domain, p->bus))) { struct bridge *c; - for (c=b->child; c; c=c->next) + for (c=b->child; c; c=c->prev) if (c->domain == (unsigned)p->domain && c->secondary <= p->bus && p->bus <= c->subordinate) { insert_dev(d, c); @@ -126,7 +126,7 @@ grow_tree(void) } *last_br = b; last_br = &b->chain; - b->next = b->child = NULL; + b->prev = b->child = NULL; b->first_bus = NULL; b->last_bus = NULL; b->br_dev = d; @@ -154,7 +154,7 @@ grow_tree(void) b->subordinate = b->secondary; *last_br = b; last_br = &b->chain; - b->next = b->child = NULL; + b->prev = b->child = NULL; b->first_bus = NULL; b->last_bus = NULL; b->br_dev = parent; @@ -184,7 +184,7 @@ grow_tree(void) best = c; if (best) { - b->next = best->child; + b->prev = best->child; best->child = b; } } @@ -88,7 +88,7 @@ void show_kernel_cleanup(void); struct bridge { struct bridge *chain; /* Single-linked list of bridges */ - struct bridge *next, *child; /* Tree of bridges */ + struct bridge *prev, *child; /* Tree of bridges */ struct bus *first_bus, *last_bus; /* List of buses connected to this bridge */ unsigned int domain; unsigned int primary, secondary, subordinate; /* Bus numbers */ |