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
6d5c7338
Commit
6d5c7338
authored
Apr 28, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Variable rename for easier searching.
parent
f564428b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+11
-11
No files found.
bin/varnishd/mgt/mgt_param.c
View file @
6d5c7338
...
...
@@ -56,7 +56,7 @@
#define MAGIC_INIT_STRING "\001"
struct
params
mgt_param
;
static
int
nparspec
;
static
struct
parspec
const
**
parspec
;
static
struct
parspec
const
**
parspec
s
;
static
int
margin
;
/*--------------------------------------------------------------------*/
...
...
@@ -67,8 +67,8 @@ mcf_findpar(const char *name)
int
i
;
for
(
i
=
0
;
i
<
nparspec
;
i
++
)
if
(
!
strcmp
(
parspec
[
i
]
->
name
,
name
))
return
(
parspec
[
i
]);
if
(
!
strcmp
(
parspec
s
[
i
]
->
name
,
name
))
return
(
parspec
s
[
i
]);
return
(
NULL
);
}
...
...
@@ -1289,7 +1289,7 @@ mcf_param_show(struct cli *cli, const char * const *av, void *priv)
else
lfmt
=
1
;
for
(
i
=
0
;
i
<
nparspec
;
i
++
)
{
pp
=
parspec
[
i
];
pp
=
parspec
s
[
i
];
if
(
av
[
2
]
!=
NULL
&&
!
lfmt
&&
strcmp
(
pp
->
name
,
av
[
2
]))
continue
;
VCLI_Out
(
cli
,
"%-*s "
,
margin
,
pp
->
name
);
...
...
@@ -1398,12 +1398,12 @@ MCF_AddParams(const struct parspec *ps)
margin
=
strlen
(
pp
->
name
)
+
1
;
n
++
;
}
parspec
=
realloc
(
parspec
,
(
1L
+
nparspec
+
n
)
*
sizeof
*
parspec
);
XXXAN
(
parspec
);
parspec
s
=
realloc
(
parspecs
,
(
1L
+
nparspec
+
n
)
*
sizeof
*
parspecs
);
XXXAN
(
parspec
s
);
for
(
pp
=
ps
;
pp
->
name
!=
NULL
;
pp
++
)
parspec
[
nparspec
++
]
=
pp
;
parspec
[
nparspec
]
=
NULL
;
qsort
(
parspec
,
nparspec
,
sizeof
parspec
[
0
],
parspec_cmp
);
parspec
s
[
nparspec
++
]
=
pp
;
parspec
s
[
nparspec
]
=
NULL
;
qsort
(
parspec
s
,
nparspec
,
sizeof
parspecs
[
0
],
parspec_cmp
);
}
/*--------------------------------------------------------------------
...
...
@@ -1417,7 +1417,7 @@ MCF_SetDefaults(struct cli *cli)
int
i
;
for
(
i
=
0
;
i
<
nparspec
;
i
++
)
{
pp
=
parspec
[
i
];
pp
=
parspec
s
[
i
];
if
(
cli
!=
NULL
)
VCLI_Out
(
cli
,
"Set Default for %s = %s
\n
"
,
pp
->
name
,
pp
->
def
);
...
...
@@ -1453,7 +1453,7 @@ MCF_DumpRst(void)
printf
(
"
\n
.. The following is the autogenerated "
"output from varnishd -x dumprst
\n\n
"
);
for
(
i
=
0
;
i
<
nparspec
;
i
++
)
{
pp
=
parspec
[
i
];
pp
=
parspec
s
[
i
];
printf
(
"%s
\n
"
,
pp
->
name
);
if
(
pp
->
units
!=
NULL
&&
*
pp
->
units
!=
'\0'
)
printf
(
"
\t
- Units: %s
\n
"
,
pp
->
units
);
...
...
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