r3612 - branches/2.0/varnish-cache/bin/varnishd

tfheen at projects.linpro.no tfheen at projects.linpro.no
Thu Feb 5 12:27:00 CET 2009


Author: tfheen
Date: 2009-02-05 12:27:00 +0100 (Thu, 05 Feb 2009)
New Revision: 3612

Modified:
   branches/2.0/varnish-cache/bin/varnishd/hash_simple_list.c
Log:
Merge r3400: Rename variables to reflect that they are object heads, not objects.



Modified: branches/2.0/varnish-cache/bin/varnishd/hash_simple_list.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/hash_simple_list.c	2009-02-05 11:23:44 UTC (rev 3611)
+++ branches/2.0/varnish-cache/bin/varnishd/hash_simple_list.c	2009-02-05 11:27:00 UTC (rev 3612)
@@ -46,7 +46,7 @@
 
 struct hsl_entry {
 	VTAILQ_ENTRY(hsl_entry)	list;
-	struct objhead		*obj;
+	struct objhead		*oh;
 	unsigned		refcnt;
 };
 
@@ -73,34 +73,34 @@
  */
 
 static struct objhead *
-hsl_lookup(const struct sess *sp, struct objhead *nobj)
+hsl_lookup(const struct sess *sp, struct objhead *noh)
 {
 	struct hsl_entry *he, *he2;
 	int i;
 
 	Lck_Lock(&hsl_mtx);
 	VTAILQ_FOREACH(he, &hsl_head, list) {
-		i = HSH_Compare(sp, he->obj);
+		i = HSH_Compare(sp, he->oh);
 		if (i < 0)
 			continue;
 		if (i > 0)
 			break;
 		he->refcnt++;
-		nobj = he->obj;
+		noh = he->oh;
 		Lck_Unlock(&hsl_mtx);
-		return (nobj);
+		return (noh);
 	}
-	if (nobj != NULL) {
+	if (noh != NULL) {
 		he2 = calloc(sizeof *he2, 1);
 		XXXAN(he2);
-		he2->obj = nobj;
+		he2->oh = noh;
 		he2->refcnt = 1;
 
-		nobj->hashpriv = he2;
-		nobj->hash = malloc(sp->lhashptr);
-		XXXAN(nobj->hash);
-		nobj->hashlen = sp->lhashptr;
-		HSH_Copy(sp, nobj);
+		noh->hashpriv = he2;
+		noh->hash = malloc(sp->lhashptr);
+		XXXAN(noh->hash);
+		noh->hashlen = sp->lhashptr;
+		HSH_Copy(sp, noh);
 
 		if (he != NULL)
 			VTAILQ_INSERT_BEFORE(he, he2, list);
@@ -108,7 +108,7 @@
 			VTAILQ_INSERT_TAIL(&hsl_head, he2, list);
 	}
 	Lck_Unlock(&hsl_mtx);
-	return (nobj);
+	return (noh);
 }
 
 /*--------------------------------------------------------------------



More information about the varnish-commit mailing list