summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2016-03-15 18:41:54 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2016-03-15 18:41:54 +0000
commitd06e52f03b02f793e145615a4b464cc56cf40be5 (patch)
treef6666b914ba242b51978e232442d6e1c103e1322
parent2fe45dde97dd157c9b4ff3bb9ddc2e02ed9e029e (diff)
downloadlighttpd-d06e52f03b02f793e145615a4b464cc56cf40be5.tar.gz
[core] rename variable in array.c
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3099 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--src/array.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/array.c b/src/array.c
index f0fdcdbf..1e06e81f 100644
--- a/src/array.c
+++ b/src/array.c
@@ -171,20 +171,20 @@ void array_set_key_value(array *hdrs, const char *key, size_t key_len, const cha
}
/* if entry already exists return pointer to existing entry, otherwise insert entry and return NULL */
-static data_unset **array_find_or_insert(array *a, data_unset *str) {
+static data_unset **array_find_or_insert(array *a, data_unset *entry) {
int ndx = -1;
int pos = 0;
size_t j;
/* generate unique index if neccesary */
- if (buffer_is_empty(str->key) || str->is_index_key) {
- buffer_copy_int(str->key, a->unique_ndx++);
- str->is_index_key = 1;
+ if (buffer_is_empty(entry->key) || entry->is_index_key) {
+ buffer_copy_int(entry->key, a->unique_ndx++);
+ entry->is_index_key = 1;
force_assert(0 != a->unique_ndx); /* must not wrap or we'll get problems */
}
- /* try to find the string */
- if (-1 != (ndx = array_get_index(a, CONST_BUF_LEN(str->key), &pos))) {
+ /* try to find the entry */
+ if (-1 != (ndx = array_get_index(a, CONST_BUF_LEN(entry->key), &pos))) {
/* found collision, return it */
return &a->data[ndx];
}
@@ -217,11 +217,11 @@ static data_unset **array_find_or_insert(array *a, data_unset *str) {
/* make sure there is nothing here */
if (a->data[ndx]) a->data[ndx]->free(a->data[ndx]);
- a->data[a->used++] = str;
+ a->data[a->used++] = entry;
if (pos != ndx &&
((pos < 0) ||
- buffer_caseless_compare(CONST_BUF_LEN(str->key), CONST_BUF_LEN(a->data[a->sorted[pos]]->key)) > 0)) {
+ buffer_caseless_compare(CONST_BUF_LEN(entry->key), CONST_BUF_LEN(a->data[a->sorted[pos]]->key)) > 0)) {
pos++;
}