[master] 2df4639f6 Polish previous commit
Nils Goroll
nils.goroll at uplex.de
Mon Oct 2 12:27:05 UTC 2023
commit 2df4639f62236c98cf8a83b29183b3b2d0426ce2
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Oct 2 14:25:43 2023 +0200
Polish previous commit
Feedback from Dridi and a Flexelint warning.
Ref 91a858401e713baf33b3364bd2b9a81f914b14d3
diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c
index cb2b5eab1..67a4efec8 100644
--- a/lib/libvarnish/vsb.c
+++ b/lib/libvarnish/vsb.c
@@ -684,9 +684,9 @@ VSB_tofile(const struct vsb *s, int fd)
r = write(fd, p, sz);
if (r < 0)
return (-1);
- assert(r <= sz);
+ assert((typeof(sz))r <= sz);
p += r;
sz -= r;
}
- return (r >= 0 ? 0 : -1);
+ return (0);
}
More information about the varnish-commit
mailing list