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
6545ac19
Commit
6545ac19
authored
Jan 08, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
White-space fix and minor flexelint-comforting
parent
bb1d202f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
random.c
lib/libvmod_directors/random.c
+1
-1
vdir.c
lib/libvmod_directors/vdir.c
+21
-21
No files found.
lib/libvmod_directors/random.c
View file @
6545ac19
...
...
@@ -114,7 +114,7 @@ vmod_random_add_backend(VRT_CTX,
}
VCL_VOID
vmod_random_remove_backend
(
VRT_CTX
,
struct
vmod_directors_random
*
rr
,
VCL_BACKEND
be
)
struct
vmod_directors_random
*
rr
,
VCL_BACKEND
be
)
__match_proto__
()
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
rr
,
VMOD_DIRECTORS_RANDOM_MAGIC
);
...
...
lib/libvmod_directors/vdir.c
View file @
6545ac19
...
...
@@ -144,7 +144,7 @@ vdir_remove_backend(struct vdir *vd, VCL_BACKEND be)
CHECK_OBJ_NOTNULL
(
vd
,
VDIR_MAGIC
);
if
(
be
==
NULL
)
return
vd
->
n_backend
;
return
(
vd
->
n_backend
)
;
CHECK_OBJ
(
be
,
DIRECTOR_MAGIC
);
vdir_wrlock
(
vd
);
for
(
u
=
0
;
u
<
vd
->
n_backend
;
u
++
)
...
...
@@ -152,15 +152,15 @@ vdir_remove_backend(struct vdir *vd, VCL_BACKEND be)
break
;
if
(
u
==
vd
->
n_backend
)
{
vdir_unlock
(
vd
);
return
vd
->
n_backend
;
return
(
vd
->
n_backend
)
;
}
vd
->
total_weight
-=
vd
->
weight
[
u
];
n
=
vd
->
n_backend
-
u
-
1
;
n
=
(
vd
->
n_backend
-
u
)
-
1
;
memmove
(
&
vd
->
backend
[
u
],
&
vd
->
backend
[
u
+
1
],
n
*
sizeof
(
vd
->
backend
[
0
]));
memmove
(
&
vd
->
weight
[
u
],
&
vd
->
weight
[
u
+
1
],
n
*
sizeof
(
vd
->
weight
[
0
]));
vd
->
n_backend
--
;
vdir_unlock
(
vd
);
return
vd
->
n_backend
;
return
(
vd
->
n_backend
)
;
}
unsigned
...
...
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