[sr-dev] git:master: dns_cache: minor fix, goto instead of break
Miklos Tirpak
miklos at iptel.org
Wed Jun 16 16:15:49 CEST 2010
Module: sip-router
Branch: master
Commit: 6a0b45abdbc1a7fa2a6cc0ce3f5d9646b7b188fd
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6a0b45abdbc1a7fa2a6cc0ce3f5d9646b7b188fd
Author: Miklos Tirpak <miklos at iptel.org>
Committer: Miklos Tirpak <miklos at iptel.org>
Date: Wed Jun 16 16:04:16 2010 +0200
dns_cache: minor fix, goto instead of break
Exit from the main look when no number of entries
has already been processed in dns_cache_clean()
---
dns_cache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dns_cache.c b/dns_cache.c
index 1f3206c..32b4e21 100644
--- a/dns_cache.c
+++ b/dns_cache.c
@@ -680,7 +680,7 @@ inline static int dns_cache_clean(unsigned int no, int expired_only)
deleted++;
}
n++;
- if (n>=no) break;
+ if (n>=no) goto skip;
}
}
/* not fair, but faster then random() */
More information about the sr-dev
mailing list