[master] 119b41747 polish: remove a superfluous variable
Nils Goroll
nils.goroll at uplex.de
Sat Apr 4 11:12:11 UTC 2020
commit 119b41747f9dd3360d1fe1ea1cb181c9aefb2e81
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sat Apr 4 12:28:22 2020 +0200
polish: remove a superfluous variable
diff --git a/lib/libvarnish/vsa.c b/lib/libvarnish/vsa.c
index 3f842458d..6c593132f 100644
--- a/lib/libvarnish/vsa.c
+++ b/lib/libvarnish/vsa.c
@@ -316,18 +316,16 @@ VSA_Build(void *d, const void *s, unsigned sal)
{
struct suckaddr *sua = d;
const struct sockaddr *sa = s;
- unsigned l;
AN(d);
AN(s);
- l = sua_len(sa);
- if (l == 0 || l != sal)
+ if (sal == 0 || sua_len(sa) != sal)
return (NULL);
INIT_OBJ(sua, SUCKADDR_MAGIC);
- memcpy(&sua->sa, s, l);
+ memcpy(&sua->sa, s, sal);
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
- sua->sa.sa_len = (unsigned char)l;
+ sua->sa.sa_len = (unsigned char)sal;
#endif
return (sua);
}
More information about the varnish-commit
mailing list