summaryrefslogtreecommitdiff
path: root/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'peer.c')
-rw-r--r--peer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/peer.c b/peer.c
index 7f8ff96..46be671 100644
--- a/peer.c
+++ b/peer.c
@@ -142,7 +142,7 @@ btclearoldpeers(struct btplist *plist)
struct btpeer *p, *nxt;
int n = 0;
- for (p = LIST_FIRST(plist); p != LIST_END(plist); p = nxt) {
+ for (p = LIST_FIRST(plist); p != NULL; p = nxt) {
nxt = LIST_NEXT(p, link);
if (--p->ttl <= 0 && p->state == FAILED) {
LIST_REMOVE(p, link);
@@ -159,7 +159,7 @@ btdelplist(struct btplist *plist)
{
struct btpeer *p, *nxt;
- for (p = LIST_FIRST(plist); p != LIST_END(plist); p = nxt) {
+ for (p = LIST_FIRST(plist); p != NULL; p = nxt) {
nxt = LIST_NEXT(p, link);
free(p);
}