mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
CLEANUP: ssl: Remove useless loop in tlskeys_list_get_next()
This loop was always exited in the first iteration by `return`.
This commit is contained in:
parent
242fb1b639
commit
2c7bb33144
@ -6360,17 +6360,14 @@ struct tls_keys_ref *tlskeys_list_get_next(struct tls_keys_ref *getnext, struct
|
|||||||
{
|
{
|
||||||
struct tls_keys_ref *ref = getnext;
|
struct tls_keys_ref *ref = getnext;
|
||||||
|
|
||||||
while (1) {
|
/* Get next list entry. */
|
||||||
|
ref = LIST_NEXT(&ref->list, struct tls_keys_ref *, list);
|
||||||
|
|
||||||
/* Get next list entry. */
|
/* If the entry is the last of the list, return NULL. */
|
||||||
ref = LIST_NEXT(&ref->list, struct tls_keys_ref *, list);
|
if (&ref->list == end)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/* If the entry is the last of the list, return NULL. */
|
return ref;
|
||||||
if (&ref->list == end)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return ref;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
|
Loading…
Reference in New Issue
Block a user