Commit e633a7f8 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Various FlexeLint inspired cleanups.

parent c7e17e08
......@@ -703,15 +703,15 @@ struct vgz *VGZ_NewUngzip(struct sess *sp, const char *id);
struct vgz *VGZ_NewGzip(struct sess *sp, const char *id);
void VGZ_Ibuf(struct vgz *, const void *, ssize_t len);
int VGZ_IbufEmpty(const struct vgz *vg);
void VGZ_Obuf(struct vgz *, const void *, ssize_t len);
void VGZ_Obuf(struct vgz *, void *, ssize_t len);
int VGZ_ObufFull(const struct vgz *vg);
int VGZ_ObufStorage(const struct sess *sp, struct vgz *vg);
int VGZ_Gzip(struct vgz *, const void **, size_t *len, enum vgz_flag);
int VGZ_Gunzip(struct vgz *, const void **, size_t *len);
void VGZ_Destroy(struct vgz **);
void VGZ_UpdateObj(const struct vgz*, struct object *);
int VGZ_WrwGunzip(const struct sess *, struct vgz *, void *ibuf, ssize_t ibufl,
char *obuf, ssize_t obufl, ssize_t *obufp);
int VGZ_WrwGunzip(const struct sess *, struct vgz *, const void *ibuf,
ssize_t ibufl, char *obuf, ssize_t obufl, ssize_t *obufp);
/* Return values */
#define VGZ_ERROR -1
......
......@@ -235,7 +235,7 @@ VGZ_IbufEmpty(const struct vgz *vg)
/*--------------------------------------------------------------------*/
void
VGZ_Obuf(struct vgz *vg, const void *ptr, ssize_t len)
VGZ_Obuf(struct vgz *vg, void *ptr, ssize_t len)
{
CHECK_OBJ_NOTNULL(vg, VGZ_MAGIC);
......@@ -353,8 +353,8 @@ VGZ_Gzip(struct vgz *vg, const void **pptr, size_t *plen, enum vgz_flag flags)
*/
int
VGZ_WrwGunzip(const struct sess *sp, struct vgz *vg, void *ibuf, ssize_t ibufl,
char *obuf, ssize_t obufl, ssize_t *obufp)
VGZ_WrwGunzip(const struct sess *sp, struct vgz *vg, const void *ibuf,
ssize_t ibufl, char *obuf, ssize_t obufl, ssize_t *obufp)
{
int i;
size_t dl;
......@@ -601,7 +601,7 @@ vfp_testgzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes)
struct vgz *vg;
ssize_t l, w;
int i = -100;
uint8_t ibuf[params->gzip_stack_buffer];
uint8_t obuf[params->gzip_stack_buffer];
size_t dl;
const void *dp;
struct storage *st;
......@@ -627,7 +627,7 @@ vfp_testgzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes)
RES_StreamPoll(sp);
while (!VGZ_IbufEmpty(vg)) {
VGZ_Obuf(vg, ibuf, sizeof ibuf);
VGZ_Obuf(vg, obuf, sizeof obuf);
i = VGZ_Gunzip(vg, &dp, &dl);
if (i != VGZ_OK && i != VGZ_END) {
WSP(sp, SLT_FetchError,
......
......@@ -89,8 +89,8 @@ TCP_name(const struct sockaddr_storage *addr, unsigned l,
* for the gai_strerror in the bufffer :-(
*/
printf("getnameinfo = %d %s\n", i, gai_strerror(i));
snprintf(abuf, alen, "Conversion");
snprintf(pbuf, plen, "Failed");
(void)snprintf(abuf, alen, "Conversion");
(void)snprintf(pbuf, plen, "Failed");
return;
}
/* XXX dirty hack for v4-to-v6 mapped addresses */
......@@ -125,8 +125,8 @@ TCP_hisname(int sock, char *abuf, unsigned alen, char *pbuf, unsigned plen)
if (!getpeername(sock, (void*)&addr_s, &l))
TCP_name(&addr_s, l, abuf, alen, pbuf, plen);
else {
snprintf(abuf, alen, "<none>");
snprintf(pbuf, plen, "<none>");
(void)snprintf(abuf, alen, "<none>");
(void)snprintf(pbuf, plen, "<none>");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment