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
76007e33
Commit
76007e33
authored
Apr 18, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed/Unsigned cleanup
parent
6334f553
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
18 deletions
+20
-18
vfil.h
include/vfil.h
+1
-1
vev.c
lib/libvarnish/vev.c
+9
-8
vfil.c
lib/libvarnish/vfil.c
+1
-1
vlu.c
lib/libvarnish/vlu.c
+9
-8
No files found.
include/vfil.h
View file @
76007e33
...
@@ -38,7 +38,7 @@ char *VFIL_readfile(const char *pfx, const char *fn, ssize_t *sz);
...
@@ -38,7 +38,7 @@ char *VFIL_readfile(const char *pfx, const char *fn, ssize_t *sz);
int
VFIL_writefile
(
const
char
*
pfx
,
const
char
*
fn
,
const
char
*
buf
,
size_t
sz
);
int
VFIL_writefile
(
const
char
*
pfx
,
const
char
*
fn
,
const
char
*
buf
,
size_t
sz
);
int
VFIL_nonblocking
(
int
fd
);
int
VFIL_nonblocking
(
int
fd
);
int
VFIL_fsinfo
(
int
fd
,
unsigned
*
pbs
,
uintmax_t
*
size
,
uintmax_t
*
space
);
int
VFIL_fsinfo
(
int
fd
,
unsigned
*
pbs
,
uintmax_t
*
size
,
uintmax_t
*
space
);
int
VFIL_allocate
(
int
fd
,
off
_t
size
,
int
insist
);
int
VFIL_allocate
(
int
fd
,
uintmax
_t
size
,
int
insist
);
void
VFIL_setpath
(
struct
vfil_path
**
,
const
char
*
path
);
void
VFIL_setpath
(
struct
vfil_path
**
,
const
char
*
path
);
typedef
int
vfil_path_func_f
(
void
*
priv
,
const
char
*
fn
);
typedef
int
vfil_path_func_f
(
void
*
priv
,
const
char
*
fn
);
int
VFIL_searchpath
(
const
struct
vfil_path
*
,
vfil_path_func_f
*
func
,
int
VFIL_searchpath
(
const
struct
vfil_path
*
,
vfil_path_func_f
*
func
,
...
...
lib/libvarnish/vev.c
View file @
76007e33
...
@@ -400,7 +400,8 @@ VEV_Once(struct vev_root *evb)
...
@@ -400,7 +400,8 @@ VEV_Once(struct vev_root *evb)
{
{
double
t
;
double
t
;
struct
vev
*
e
;
struct
vev
*
e
;
int
i
,
j
,
k
,
tmo
,
retval
=
1
;
int
i
,
k
,
tmo
,
retval
=
1
;
unsigned
u
;
CHECK_OBJ_NOTNULL
(
evb
,
VEV_BASE_MAGIC
);
CHECK_OBJ_NOTNULL
(
evb
,
VEV_BASE_MAGIC
);
assert
(
evb
->
thread
==
pthread_self
());
assert
(
evb
->
thread
==
pthread_self
());
...
@@ -440,21 +441,21 @@ VEV_Once(struct vev_root *evb)
...
@@ -440,21 +441,21 @@ VEV_Once(struct vev_root *evb)
}
}
k
=
0
;
k
=
0
;
for
(
j
=
1
;
j
<
evb
->
lpfd
;
j
++
)
{
for
(
u
=
1
;
u
<
evb
->
lpfd
;
u
++
)
{
evb
->
pev
[
j
]
->
fd_events
=
evb
->
pfd
[
j
].
revents
;
evb
->
pev
[
u
]
->
fd_events
=
evb
->
pfd
[
u
].
revents
;
if
(
evb
->
pev
[
j
]
->
fd_events
)
if
(
evb
->
pev
[
u
]
->
fd_events
)
k
++
;
k
++
;
}
}
assert
(
k
==
i
);
assert
(
k
==
i
);
DBG
(
evb
,
"EVENTS %d
\n
"
,
i
);
DBG
(
evb
,
"EVENTS %d
\n
"
,
i
);
while
(
i
>
0
)
{
while
(
i
>
0
)
{
for
(
j
=
BINHEAP_NOIDX
+
1
;
j
<
evb
->
lpfd
;
j
++
)
{
for
(
u
=
BINHEAP_NOIDX
+
1
;
u
<
evb
->
lpfd
;
u
++
)
{
e
=
evb
->
pev
[
j
];
e
=
evb
->
pev
[
u
];
if
(
e
->
fd_events
==
0
)
if
(
e
->
fd_events
==
0
)
continue
;
continue
;
DBG
(
evb
,
"EVENT %p
j=%d
fd=%d ev=0x%x %d
\n
"
,
DBG
(
evb
,
"EVENT %p
u=%u
fd=%d ev=0x%x %d
\n
"
,
e
,
j
,
e
->
fd
,
e
->
fd_events
,
i
);
e
,
u
,
e
->
fd
,
e
->
fd_events
,
i
);
k
=
e
->
callback
(
e
,
e
->
fd_events
);
k
=
e
->
callback
(
e
,
e
->
fd_events
);
e
->
fd_events
=
0
;
e
->
fd_events
=
0
;
i
--
;
i
--
;
...
...
lib/libvarnish/vfil.c
View file @
76007e33
...
@@ -224,7 +224,7 @@ VFIL_fsinfo(int fd, unsigned *pbs, uintmax_t *psize, uintmax_t *pspace)
...
@@ -224,7 +224,7 @@ VFIL_fsinfo(int fd, unsigned *pbs, uintmax_t *psize, uintmax_t *pspace)
*/
*/
int
int
VFIL_allocate
(
int
fd
,
off
_t
size
,
int
insist
)
VFIL_allocate
(
int
fd
,
uintmax
_t
size
,
int
insist
)
{
{
struct
stat
st
;
struct
stat
st
;
uintmax_t
fsspace
;
uintmax_t
fsspace
;
...
...
lib/libvarnish/vlu.c
View file @
76007e33
...
@@ -144,19 +144,20 @@ VLU_File(int fd, vlu_f *func, void *priv, unsigned bufsize)
...
@@ -144,19 +144,20 @@ VLU_File(int fd, vlu_f *func, void *priv, unsigned bufsize)
int
int
VLU_Feed
(
struct
vlu
*
l
,
const
char
*
ptr
,
int
len
)
VLU_Feed
(
struct
vlu
*
l
,
const
char
*
ptr
,
int
len
)
{
{
int
i
=
0
,
ll
;
int
i
=
0
;
unsigned
u
;
CHECK_OBJ_NOTNULL
(
l
,
LINEUP_MAGIC
);
CHECK_OBJ_NOTNULL
(
l
,
LINEUP_MAGIC
);
AN
(
ptr
);
AN
(
ptr
);
assert
(
len
>
0
);
assert
(
len
>
0
);
while
(
len
>
0
)
{
while
(
len
>
0
)
{
ll
=
len
;
u
=
len
;
if
(
ll
>
l
->
bufl
-
l
->
bufp
)
if
(
u
>
l
->
bufl
-
l
->
bufp
)
ll
=
l
->
bufl
-
l
->
bufp
;
u
=
l
->
bufl
-
l
->
bufp
;
memcpy
(
l
->
buf
+
l
->
bufp
,
ptr
,
ll
);
memcpy
(
l
->
buf
+
l
->
bufp
,
ptr
,
u
);
len
-=
ll
;
len
-=
u
;
ptr
+=
ll
;
ptr
+=
u
;
l
->
bufp
+=
ll
;
l
->
bufp
+=
u
;
i
=
LineUpProcess
(
l
);
i
=
LineUpProcess
(
l
);
if
(
i
)
if
(
i
)
return
(
i
);
return
(
i
);
...
...
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