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
aa809b5d
Commit
aa809b5d
authored
Jun 26, 2018
by
Nils Goroll
Committed by
Dridi Boukelmoune
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polish: use TAKE_OBJ_NOTNULL
parent
92ee4e48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
shard_dir.c
lib/libvmod_directors/shard_dir.c
+1
-5
vmod_shard.c
lib/libvmod_directors/vmod_shard.c
+5
-7
No files found.
lib/libvmod_directors/shard_dir.c
View file @
aa809b5d
...
...
@@ -241,11 +241,7 @@ sharddir_delete(struct sharddir **sharddp)
{
struct
sharddir
*
shardd
;
AN
(
sharddp
);
shardd
=
*
sharddp
;
*
sharddp
=
NULL
;
CHECK_OBJ_NOTNULL
(
shardd
,
SHARDDIR_MAGIC
);
TAKE_OBJ_NOTNULL
(
shardd
,
sharddp
,
SHARDDIR_MAGIC
);
shardcfg_delete
(
shardd
);
AZ
(
pthread_rwlock_destroy
(
&
shardd
->
mtx
));
FREE_OBJ
(
shardd
);
...
...
lib/libvmod_directors/vmod_shard.c
View file @
aa809b5d
...
...
@@ -263,10 +263,9 @@ vmod_shard__init(VRT_CTX, struct vmod_directors_shard **vshardp,
VCL_VOID
v_matchproto_
(
td_directors_shard__fini
)
vmod_shard__fini
(
struct
vmod_directors_shard
**
vshardp
)
{
struct
vmod_directors_shard
*
vshard
=
*
vshardp
;
struct
vmod_directors_shard
*
vshard
;
*
vshardp
=
NULL
;
CHECK_OBJ_NOTNULL
(
vshard
,
VMOD_SHARD_SHARD_MAGIC
);
TAKE_OBJ_NOTNULL
(
vshard
,
vshardp
,
VMOD_SHARD_SHARD_MAGIC
);
sharddir_delete
(
&
vshard
->
shardd
);
free
(
vshard
->
dir
->
vcl_name
);
FREE_OBJ
(
vshard
->
dir
);
...
...
@@ -794,12 +793,11 @@ vmod_shard_param__init(VRT_CTX,
VCL_VOID
v_matchproto_
(
td_directors_shard_param__fini
)
vmod_shard_param__fini
(
struct
vmod_directors_shard_param
**
pp
)
{
struct
vmod_directors_shard_param
*
p
=
*
pp
;
struct
vmod_directors_shard_param
*
p
;
if
(
p
==
NULL
)
if
(
*
p
p
==
NULL
)
return
;
*
pp
=
NULL
;
CHECK_OBJ_NOTNULL
(
p
,
VMOD_SHARD_SHARD_PARAM_MAGIC
);
TAKE_OBJ_NOTNULL
(
p
,
pp
,
VMOD_SHARD_SHARD_PARAM_MAGIC
);
FREE_OBJ
(
p
);
}
...
...
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