Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
e633a7f8
Commit
e633a7f8
authored
May 13, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various FlexeLint inspired cleanups.
parent
c7e17e08
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
cache.h
bin/varnishd/cache.h
+3
-3
cache_gzip.c
bin/varnishd/cache_gzip.c
+5
-5
tcp.c
lib/libvarnish/tcp.c
+4
-4
No files found.
bin/varnishd/cache.h
View file @
e633a7f8
...
...
@@ -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
...
...
bin/varnishd/cache_gzip.c
View file @
e633a7f8
...
...
@@ -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
i
buf
[
params
->
gzip_stack_buffer
];
uint8_t
o
buf
[
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
i
buf
);
VGZ_Obuf
(
vg
,
obuf
,
sizeof
o
buf
);
i
=
VGZ_Gunzip
(
vg
,
&
dp
,
&
dl
);
if
(
i
!=
VGZ_OK
&&
i
!=
VGZ_END
)
{
WSP
(
sp
,
SLT_FetchError
,
...
...
lib/libvarnish/tcp.c
View file @
e633a7f8
...
...
@@ -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>"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment