diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2022-07-06 10:35:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-06 10:35:24 +0200 |
| commit | 5adddad38f7716d7d118204b3ac39f5b18040305 (patch) | |
| tree | 15b39280513962abf0e5776edbe34a3adb20a14b /lib/typesafe.h | |
| parent | e894ef7e77157f0a5d7a2be7b572a949c645dbe3 (diff) | |
| parent | f580074e61d487fd83d0160629b1de3486df98b2 (diff) | |
Merge pull request #11534 from mjstapp/fix_typesafe_sa
lib: fix SA warning in typesafe code
Diffstat (limited to 'lib/typesafe.h')
| -rw-r--r-- | lib/typesafe.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/typesafe.h b/lib/typesafe.h index 06fdc52e78..df963f530d 100644 --- a/lib/typesafe.h +++ b/lib/typesafe.h @@ -309,7 +309,8 @@ static inline void typesafe_dlist_add(struct dlist_head *head, struct dlist_item *prev, struct dlist_item *item) { item->next = prev->next; - item->next->prev = item; + if (item->next) + item->next->prev = item; item->prev = prev; prev->next = item; head->count++; |
