[master] f8ec37d Minor polish for PCLint-Plus
Poul-Henning Kamp
phk at FreeBSD.org
Sun Oct 22 12:24:09 UTC 2017
commit f8ec37d50e98d1faf14982b0a29ccef318f27824
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sun Oct 22 12:22:00 2017 +0000
Minor polish for PCLint-Plus
diff --git a/lib/libvmod_blob/base64.c b/lib/libvmod_blob/base64.c
index a46d88c..f7a8c06 100644
--- a/lib/libvmod_blob/base64.c
+++ b/lib/libvmod_blob/base64.c
@@ -57,7 +57,7 @@ base64_decode_l(size_t l)
}
static inline int
-decode(char *restrict *restrict dest, char *restrict const buf,
+decode(char *restrict *restrict dest, const char *restrict const buf,
const size_t buflen, unsigned u, const int n)
{
char *d;
@@ -184,7 +184,7 @@ base64_decode(const enum encoding dec, char *restrict const buf,
}
if (n) {
if (!alpha->padding)
- u <<= 6 * (4 - n);
+ u <<= (6 * (4 - n));
if (decode(&dest, buf, buflen, u, n-term) < 0)
return -1;
}
diff --git a/lib/libvmod_blob/wb.h b/lib/libvmod_blob/wb.h
index 7bd1cbf..ce11ba1 100644
--- a/lib/libvmod_blob/wb.h
+++ b/lib/libvmod_blob/wb.h
@@ -34,26 +34,26 @@ struct wb_s {
/* return one byte less for the final zero byte */
static inline const char*
-wb_end(struct wb_s *wb) {
+wb_end(const struct wb_s *wb) {
return wb->ws->r - 1;
}
/* return the write position */
static inline char*
-wb_buf(struct wb_s *wb) {
+wb_buf(const struct wb_s *wb) {
return wb->w;
}
/* return one byte less for the final zero byte */
static inline ssize_t
-wb_space(struct wb_s *wb) {
+wb_space(const struct wb_s *wb) {
ssize_t f = wb->ws->r - wb->w;
assert(f > 0);
return f - 1;
}
static inline ssize_t
-wb_len(struct wb_s *wb) {
+wb_len(const struct wb_s *wb) {
ssize_t l = wb->w - wb->ws->f;
assert(l >= 0);
return l;
More information about the varnish-commit
mailing list