Commit Diff
Diff:
eab3f47f6cb99121dc42a0d325dfcabd13ee89ce
2dac465101cf1f19221cbb583a08dbab08a01f28
Commit:
2dac465101cf1f19221cbb583a08dbab08a01f28
Tree:
027d234fe53337fb89c9797d4555612c3b5be7b7
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Fri May 11 23:36:45 2018 UTC
Message:
using SLIST_FOREACH() on entp while it's in a middle of another SLIST_FOREACH() is probably not a good idea, use ent2 pointer instead.
blob - b0be36de3328564fd1b67a80fdb421a2ac39c5f0
blob + cf83e4791fa71530811bcb0cb970bc227d10b965
--- ent.c
+++ ent.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: ent.c,v 1.5 2018/05/11 23:21:20 pjp Exp $
+ * $Id: ent.c,v 1.6 2018/05/11 23:36:45 pjp Exp $
*/
/*
@@ -151,11 +151,11 @@ exists:
* base of an ENT...this was overlooked originally
*/
- SLIST_FOREACH(entp, &enthead, ent_entry) {
- if (entp->len != l)
+ SLIST_FOREACH(ent2, &enthead, ent_entry) {
+ if (ent2->len != l)
continue;
- if (memcasecmp(entp->name, p, l) == 0)
+ if (memcasecmp(ent2->name, p, l) == 0)
return 0;
}
repomaster@centroid.eu