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
3e3357f9
Commit
3e3357f9
authored
May 05, 2016
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mostly whitespace OCD
Reduces my stash list to 62 entries.
parent
9552aa16
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
21 deletions
+23
-21
cache_ws.c
bin/varnishd/cache/cache_ws.c
+2
-2
varnishncsa.c
bin/varnishncsa/varnishncsa.c
+2
-3
index.rst
doc/sphinx/dev-guide/index.rst
+1
-1
vmod_debug.c
lib/libvmod_debug/vmod_debug.c
+18
-15
No files found.
bin/varnishd/cache/cache_ws.c
View file @
3e3357f9
...
...
@@ -134,7 +134,7 @@ WS_Alloc(struct ws *ws, unsigned bytes)
assert
(
ws
->
r
==
NULL
);
if
(
ws
->
f
+
bytes
>
ws
->
e
)
{
WS_MarkOverflow
(
ws
);
return
(
NULL
);
return
(
NULL
);
}
r
=
ws
->
f
;
ws
->
f
+=
bytes
;
...
...
@@ -159,7 +159,7 @@ WS_Copy(struct ws *ws, const void *str, int len)
bytes
=
PRNDUP
((
unsigned
)
len
);
if
(
ws
->
f
+
bytes
>
ws
->
e
)
{
WS_MarkOverflow
(
ws
);
return
(
NULL
);
return
(
NULL
);
}
r
=
ws
->
f
;
ws
->
f
+=
bytes
;
...
...
bin/varnishncsa/varnishncsa.c
View file @
3e3357f9
...
...
@@ -629,11 +629,10 @@ parse_x_format(char *buf)
if
(
!
strncmp
(
buf
,
"VSL:"
,
4
))
{
buf
+=
4
;
e
=
buf
;
while
(
*
e
!=
'\0'
)
while
(
*
e
!=
'\0'
)
e
++
;
if
(
e
==
buf
)
{
if
(
e
==
buf
)
VUT_Error
(
1
,
"Missing tag in VSL:"
);
}
if
(
e
[
-
1
]
==
']'
)
{
r
=
e
-
1
;
while
(
r
>
buf
&&
*
r
!=
'['
)
...
...
doc/sphinx/dev-guide/index.rst
View file @
3e3357f9
...
...
@@ -80,5 +80,5 @@ These rules are imported from the X11 project:
* Isolate complexity as much as possible.
* Provide mechanism, rather than policy.
* Provide mechanism, rather than policy.
lib/libvmod_debug/vmod_debug.c
View file @
3e3357f9
...
...
@@ -191,7 +191,7 @@ vmod_argtest(VRT_CTX, VCL_STRING one, VCL_REAL two, VCL_STRING three,
char
buf
[
100
];
bprintf
(
buf
,
"%s %g %s %s"
,
one
,
two
,
three
,
comma
);
return
WS_Copy
(
ctx
->
ws
,
buf
,
-
1
);
return
(
WS_Copy
(
ctx
->
ws
,
buf
,
-
1
)
);
}
VCL_INT
...
...
@@ -352,10 +352,10 @@ event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
{
switch
(
e
)
{
case
VCL_EVENT_LOAD
:
return
event_load
(
ctx
,
priv
);
case
VCL_EVENT_WARM
:
return
event_warm
(
ctx
,
priv
);
case
VCL_EVENT_COLD
:
return
event_cold
(
ctx
,
priv
);
default:
return
(
0
);
case
VCL_EVENT_LOAD
:
return
event_load
(
ctx
,
priv
);
case
VCL_EVENT_WARM
:
return
event_warm
(
ctx
,
priv
);
case
VCL_EVENT_COLD
:
return
event_cold
(
ctx
,
priv
);
default:
return
(
0
);
}
}
...
...
@@ -367,16 +367,18 @@ vmod_sleep(VRT_CTX, VCL_DURATION t)
VTIM_sleep
(
t
);
}
static
struct
ws
*
wsfind
(
VRT_CTX
,
VCL_ENUM
which
)
{
if
(
!
strcmp
(
which
,
"client"
))
{
return
ctx
->
ws
;
}
else
if
(
!
strcmp
(
which
,
"backend"
))
{
return
ctx
->
bo
->
ws
;
}
else
if
(
!
strcmp
(
which
,
"session"
))
{
return
ctx
->
req
->
sp
->
ws
;
}
else
if
(
!
strcmp
(
which
,
"thread"
))
{
return
ctx
->
req
->
wrk
->
aws
;
}
else
static
struct
ws
*
wsfind
(
VRT_CTX
,
VCL_ENUM
which
)
{
if
(
!
strcmp
(
which
,
"client"
))
return
(
ctx
->
ws
);
else
if
(
!
strcmp
(
which
,
"backend"
))
return
(
ctx
->
bo
->
ws
);
else
if
(
!
strcmp
(
which
,
"session"
))
return
(
ctx
->
req
->
sp
->
ws
);
else
if
(
!
strcmp
(
which
,
"thread"
))
return
(
ctx
->
req
->
wrk
->
aws
);
else
WRONG
(
"No such workspace."
);
}
...
...
@@ -425,6 +427,7 @@ vmod_workspace_overflowed(VRT_CTX, VCL_ENUM which)
}
static
char
*
debug_ws_snap
;
void
vmod_workspace_snap
(
VRT_CTX
,
VCL_ENUM
which
)
{
...
...
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