[6.0] 5fdbd0957 polish blob.same and blob.equal
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue Feb 5 16:30:16 UTC 2019
commit 5fdbd0957eae0accf1dc10657db30e3766260654
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Nov 12 17:37:24 2018 +0100
polish blob.same and blob.equal
If two blob pointers compare equal, the blobs are both the same and
equal - both being NULL is implied.
diff --git a/lib/libvmod_blob/vmod_blob.c b/lib/libvmod_blob/vmod_blob.c
index 632580e91..08fd2ddf8 100644
--- a/lib/libvmod_blob/vmod_blob.c
+++ b/lib/libvmod_blob/vmod_blob.c
@@ -527,7 +527,7 @@ vmod_same(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
{
(void) ctx;
- if (b1 == NULL && b2 == NULL)
+ if (b1 == b2)
return 1;
if (b1 == NULL || b2 == NULL)
return 0;
@@ -539,7 +539,7 @@ vmod_equal(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
{
(void) ctx;
- if (b1 == NULL && b2 == NULL)
+ if (b1 == b2)
return 1;
if (b1 == NULL || b2 == NULL)
return 0;
More information about the varnish-commit
mailing list