[master] d86f1850b Clarify the comment
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Apr 10 11:24:07 UTC 2019
commit d86f1850bc6ebabd61ef7274e2ff06784be0669f
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Wed Apr 10 13:21:49 2019 +0200
Clarify the comment
This is the intent that was not obvious to me when I first reviewed this
change.
diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index b108a3062..5576ca6fd 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -778,8 +778,8 @@ HSH_Cancel(struct worker *wrk, struct objcore *oc, struct boc *boc)
return;
/*
- * the caller-provided boc is optional, if they do not have one, we grab
- * a ref
+ * NB: we use two distinct variables to only release the reference if
+ * we had to acquire one. The caller-provided boc is optional.
*/
if (boc == NULL)
bocref = boc = HSH_RefBoc(oc);
More information about the varnish-commit
mailing list