summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2012-12-04 12:09:52 +0100
committerBertrand Jacquin <beber@meleeweb.net>2012-12-04 12:09:52 +0100
commit61bd288c17bc977bd359a978bdc08cb342961920 (patch)
tree81449836ae992581006865c6840b7ada983fe5ef
parent[CLEANUP] Fix invalid conversion with cast (diff)
downloadmod_virtualvalue-61bd288c17bc977bd359a978bdc08cb342961920.tar.gz
[CLEANUP] Avoid usage of variable new as ekopath don't like that
$ make clean shared CC=pathCC V=1 .. mod_virtualvalue.c: In function 'char* vv_flat_arg(char*, request_rec*)': mod_virtualvalue.c:272: error: expected unqualified-id before 'new' mod_virtualvalue.c:272: error: expected initializer before 'new'
-rw-r--r--mod_virtualvalue.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/mod_virtualvalue.c b/mod_virtualvalue.c
index 08ec9f5..54b081e 100644
--- a/mod_virtualvalue.c
+++ b/mod_virtualvalue.c
@@ -266,19 +266,19 @@ static const char *vv_replace_SYM (char *full __U__, char *search, request_rec *
return (real);
}
-static char *vv_flat_arg (char *arg, request_rec *r)
+static char *vv_flat_arg (char *s1, request_rec *r)
{
char *c, *end;
- const char *new;
+ const char *s2;
tag_t *i;
char final[DEFAULT_MAX_SIZE];
char search[DEFAULT_MAX_SEARCH];
- apr_cpystrn (final, arg, strlen(arg)+1);
+ apr_cpystrn (final, s1, strlen(s1)+1);
- c = final + strlen(arg);
+ c = final + strlen(s1);
while ((c = vv_strrrstr(final, c, "%{")))
{
@@ -290,23 +290,23 @@ static char *vv_flat_arg (char *arg, request_rec *r)
return NULL;
}
- for (i = tag_tab, new = NULL ; i->tag != NULL ; i++)
+ for (i = tag_tab, s2 = NULL ; i->tag != NULL ; i++)
{
if (strncmp (c+2, i->tag, i->len) == 0)
{
memcpy (&search, c+2 + i->len +1, end - (c+2 + i->len) -1);
search[end - (c+2 + i->len) -1] = '\0';
- new = i->func (c, search, r);
+ s2 = i->func (c, search, r);
break;
}
}
- if (new)
+ if (s2)
{
- memmove (c + strlen(new), end+1, strlen(c));
- memcpy (c, new, strlen(new));
+ memmove (c + strlen(s2), end+1, strlen(c));
+ memcpy (c, s2, strlen(s2));
}
c--;
@@ -317,14 +317,14 @@ static char *vv_flat_arg (char *arg, request_rec *r)
static int vv_echo (int argc __U__, char **argv, request_rec *r)
{
- char *new;
+ char *s2;
VV_error("%s", "");
VV_error("Original: %s", argv[0]);
- new = vv_flat_arg (argv[0], r);
+ s2 = vv_flat_arg (argv[0], r);
- VV_error("Translat: %s", new);
+ VV_error("Translat: %s", s2);
VV_error("%s", "");
return (OK);