Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Commits
[master] 6d5c733 Variable rename for easier searching.
 

Index | Next | Previous | View Flat


phk at varnish-cache

Apr 28, 2012, 2:19 AM


Views: 95
Permalink
[master] 6d5c733 Variable rename for easier searching.

commit 6d5c7338eddf7f1fdeef11193db1519244319380
Author: Poul-Henning Kamp <phk [at] FreeBSD>
Date: Sat Apr 28 08:44:11 2012 +0000

Variable rename for easier searching.

diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index f6493ad..7f63e2f 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -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 ** parspecs;
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(parspecs[i]->name, name))
+ return (parspecs[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 = parspecs[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);
+ parspecs = realloc(parspecs, (1L + nparspec + n) * sizeof *parspecs);
+ XXXAN(parspecs);
for (pp = ps; pp->name != NULL; pp++)
- parspec[nparspec++] = pp;
- parspec[nparspec] = NULL;
- qsort (parspec, nparspec, sizeof parspec[0], parspec_cmp);
+ parspecs[nparspec++] = pp;
+ parspecs[nparspec] = NULL;
+ qsort (parspecs, 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 = parspecs[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 = parspecs[i];
printf("%s\n", pp->name);
if (pp->units != NULL && *pp->units != '\0')
printf("\t- Units: %s\n", pp->units);

_______________________________________________
varnish-commit mailing list
varnish-commit [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit

Subject User Time
[master] 6d5c733 Variable rename for easier searching. phk at varnish-cache Apr 28, 2012, 2:19 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.