summaryrefslogtreecommitdiffstats
path: root/Utilities/cmxmlrpc
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmxmlrpc')
-rw-r--r--Utilities/cmxmlrpc/xmlrpc.h8
-rw-r--r--Utilities/cmxmlrpc/xmlrpc_array.c26
-rw-r--r--Utilities/cmxmlrpc/xmlrpc_curl_transport.c6
-rw-r--r--Utilities/cmxmlrpc/xmlrpc_parse.c12
-rw-r--r--Utilities/cmxmlrpc/xmlrpc_struct.c46
5 files changed, 49 insertions, 49 deletions
diff --git a/Utilities/cmxmlrpc/xmlrpc.h b/Utilities/cmxmlrpc/xmlrpc.h
index d7831ac..cffbc91 100644
--- a/Utilities/cmxmlrpc/xmlrpc.h
+++ b/Utilities/cmxmlrpc/xmlrpc.h
@@ -472,7 +472,7 @@ xmlrpc_array_append_item (xmlrpc_env* const env,
void
xmlrpc_array_read_item(xmlrpc_env * const envP,
const xmlrpc_value * const arrayP,
- unsigned int const index,
+ unsigned int const xmIndex,
xmlrpc_value ** const valuePP);
/* Get an item from an XML-RPC array.
@@ -482,7 +482,7 @@ xmlrpc_array_read_item(xmlrpc_env * const envP,
xmlrpc_value *
xmlrpc_array_get_item(xmlrpc_env * const env,
const xmlrpc_value * const array,
- int const index);
+ int const xmIndex);
/* Not implemented--we don't need it yet.
extern
@@ -609,7 +609,7 @@ xmlrpc_struct_set_value_v(xmlrpc_env * const env,
void
xmlrpc_struct_read_member(xmlrpc_env * const envP,
xmlrpc_value * const structP,
- unsigned int const index,
+ unsigned int const xmIndex,
xmlrpc_value ** const keyvalP,
xmlrpc_value ** const valueP);
@@ -622,7 +622,7 @@ xmlrpc_struct_read_member(xmlrpc_env * const envP,
void
xmlrpc_struct_get_key_and_value(xmlrpc_env * const env,
xmlrpc_value * const strct,
- int const index,
+ int const xmIndex,
xmlrpc_value ** const out_keyval,
xmlrpc_value ** const out_value);
diff --git a/Utilities/cmxmlrpc/xmlrpc_array.c b/Utilities/cmxmlrpc/xmlrpc_array.c
index fc56382..31576f0 100644
--- a/Utilities/cmxmlrpc/xmlrpc_array.c
+++ b/Utilities/cmxmlrpc/xmlrpc_array.c
@@ -30,10 +30,10 @@ xmlrpc_abort_if_array_bad(xmlrpc_value * const arrayP) {
if (contents == NULL)
abort();
else {
- unsigned int index;
+ unsigned int xmIndex;
- for (index = 0; index < arraySize; ++index) {
- xmlrpc_value * const itemP = contents[index];
+ for (xmIndex = 0; xmIndex < arraySize; ++xmIndex) {
+ xmlrpc_value * const itemP = contents[xmIndex];
if (itemP == NULL)
abort();
else if (itemP->_refcount < 1)
@@ -56,13 +56,13 @@ xmlrpc_destroyArrayContents(xmlrpc_value * const arrayP) {
xmlrpc_value ** const contents =
XMLRPC_MEMBLOCK_CONTENTS(xmlrpc_value*, &arrayP->_block);
- unsigned int index;
+ unsigned int xmIndex;
XMLRPC_ASSERT_ARRAY_OK(arrayP);
/* Release our reference to each item in the array */
- for (index = 0; index < arraySize; ++index) {
- xmlrpc_value * const itemP = contents[index];
+ for (xmIndex = 0; xmIndex < arraySize; ++xmIndex) {
+ xmlrpc_value * const itemP = contents[xmIndex];
xmlrpc_DECREF(itemP);
}
XMLRPC_MEMBLOCK_CLEAN(xmlrpc_value *, &arrayP->_block);
@@ -125,7 +125,7 @@ xmlrpc_array_append_item(xmlrpc_env * const envP,
void
xmlrpc_array_read_item(xmlrpc_env * const envP,
const xmlrpc_value * const arrayP,
- unsigned int const index,
+ unsigned int const xmIndex,
xmlrpc_value ** const valuePP) {
XMLRPC_ASSERT_ENV_OK(envP);
@@ -142,12 +142,12 @@ xmlrpc_array_read_item(xmlrpc_env * const envP,
size_t const size =
XMLRPC_MEMBLOCK_SIZE(xmlrpc_value *, &arrayP->_block);
- if (index >= size)
+ if (xmIndex >= size)
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_INDEX_ERROR, "Array index %u is beyond end "
- "of %u-item array", index, (unsigned int)size);
+ "of %u-item array", xmIndex, (unsigned int)size);
else {
- *valuePP = contents[index];
+ *valuePP = contents[xmIndex];
xmlrpc_INCREF(*valuePP);
}
}
@@ -158,15 +158,15 @@ xmlrpc_array_read_item(xmlrpc_env * const envP,
xmlrpc_value *
xmlrpc_array_get_item(xmlrpc_env * const envP,
const xmlrpc_value * const arrayP,
- int const index) {
+ int const xmIndex) {
xmlrpc_value * valueP;
- if (index < 0)
+ if (xmIndex < 0)
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_INDEX_ERROR, "Index %d is negative.");
else {
- xmlrpc_array_read_item(envP, arrayP, index, &valueP);
+ xmlrpc_array_read_item(envP, arrayP, xmIndex, &valueP);
if (!envP->fault_occurred)
xmlrpc_DECREF(valueP);
diff --git a/Utilities/cmxmlrpc/xmlrpc_curl_transport.c b/Utilities/cmxmlrpc/xmlrpc_curl_transport.c
index 0852d28..e98353e 100644
--- a/Utilities/cmxmlrpc/xmlrpc_curl_transport.c
+++ b/Utilities/cmxmlrpc/xmlrpc_curl_transport.c
@@ -368,12 +368,12 @@ performCurlTransaction(xmlrpc_env * const envP,
"HTTP POST request. curl_easy_perform() says: %s",
curlTransactionP->curlError);
else {
- CURLcode res;
+ CURLcode crRes;
long http_result;
- res = curl_easy_getinfo(curlSessionP, CURLINFO_HTTP_CODE,
+ crRes = curl_easy_getinfo(curlSessionP, CURLINFO_HTTP_CODE,
&http_result);
- if (res != CURLE_OK)
+ if (crRes != CURLE_OK)
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_INTERNAL_ERROR,
"Curl performed the HTTP POST request, but was "
diff --git a/Utilities/cmxmlrpc/xmlrpc_parse.c b/Utilities/cmxmlrpc/xmlrpc_parse.c
index 8a1f172..ec14773 100644
--- a/Utilities/cmxmlrpc/xmlrpc_parse.c
+++ b/Utilities/cmxmlrpc/xmlrpc_parse.c
@@ -110,7 +110,7 @@ get_child_by_name (xmlrpc_env *env, xml_element *parent, char *name)
*/
static xmlrpc_int32
-xmlrpc_atoi(xmlrpc_env *env, char *str, size_t strlen,
+xmlrpc_atoi(xmlrpc_env *env, char *str, size_t stringLength,
xmlrpc_int32 min, xmlrpc_int32 max)
{
long i;
@@ -128,7 +128,7 @@ xmlrpc_atoi(xmlrpc_env *env, char *str, size_t strlen,
"\"%s\" must not contain whitespace", str);
/* Convert the value. */
- end = str + strlen;
+ end = str + stringLength;
errno = 0;
i = strtol(str, &end, 10);
@@ -145,7 +145,7 @@ xmlrpc_atoi(xmlrpc_env *env, char *str, size_t strlen,
"\"%s\" must be in range %d to %d", str, min, max);
/* Check for unused characters. */
- if (end != str + strlen)
+ if (end != str + stringLength)
XMLRPC_FAIL1(env, XMLRPC_PARSE_ERROR,
"\"%s\" contained trailing data", str);
@@ -159,7 +159,7 @@ xmlrpc_atoi(xmlrpc_env *env, char *str, size_t strlen,
static double
-xmlrpc_atod(xmlrpc_env *env, char *str, size_t strlen)
+xmlrpc_atod(xmlrpc_env *env, char *str, size_t stringLength)
{
double d;
char *end;
@@ -176,7 +176,7 @@ xmlrpc_atod(xmlrpc_env *env, char *str, size_t strlen)
"\"%s\" must not contain whitespace", str);
/* Convert the value. */
- end = str + strlen;
+ end = str + stringLength;
errno = 0;
d = strtod(str, &end);
@@ -188,7 +188,7 @@ xmlrpc_atod(xmlrpc_env *env, char *str, size_t strlen)
str, strerror(errno), errno);
/* Check for unused characters. */
- if (end != str + strlen)
+ if (end != str + stringLength)
XMLRPC_FAIL1(env, XMLRPC_PARSE_ERROR,
"\"%s\" contained trailing data", str);
diff --git a/Utilities/cmxmlrpc/xmlrpc_struct.c b/Utilities/cmxmlrpc/xmlrpc_struct.c
index d31b8c3..21bf9d4 100644
--- a/Utilities/cmxmlrpc/xmlrpc_struct.c
+++ b/Utilities/cmxmlrpc/xmlrpc_struct.c
@@ -216,22 +216,22 @@ xmlrpc_struct_has_key_n(xmlrpc_env * const envP,
xmlrpc_value * const strctP,
const char * const key,
size_t const key_len) {
- int index;
+ int xmIndex;
/* Suppress a compiler warning about uninitialized variables. */
- index = 0;
+ xmIndex = 0;
XMLRPC_ASSERT_ENV_OK(envP);
XMLRPC_ASSERT_VALUE_OK(strctP);
XMLRPC_ASSERT(key != NULL);
XMLRPC_TYPE_CHECK(envP, strctP, XMLRPC_TYPE_STRUCT);
- index = find_member(strctP, key, key_len);
+ xmIndex = find_member(strctP, key, key_len);
cleanup:
if (envP->fault_occurred)
return 0;
- return (index >= 0);
+ return (xmIndex >= 0);
}
@@ -266,16 +266,16 @@ xmlrpc_struct_find_value(xmlrpc_env * const envP,
envP, XMLRPC_TYPE_ERROR, "Value is not a struct. It is type #%d",
structP->_type);
else {
- int index;
+ int xmIndex;
/* Get our member index. */
- index = find_member(structP, key, strlen(key));
- if (index < 0)
+ xmIndex = find_member(structP, key, strlen(key));
+ if (xmIndex < 0)
*valuePP = NULL;
else {
_struct_member * const members =
XMLRPC_MEMBLOCK_CONTENTS(_struct_member, &structP->_block);
- *valuePP = members[index].value;
+ *valuePP = members[xmIndex].value;
XMLRPC_ASSERT_VALUE_OK(*valuePP);
@@ -310,18 +310,18 @@ xmlrpc_struct_find_value_v(xmlrpc_env * const envP,
"It is type #%d",
keyP->_type);
else {
- int index;
+ int xmIndex;
/* Get our member index. */
- index = find_member(structP,
+ xmIndex = find_member(structP,
XMLRPC_MEMBLOCK_CONTENTS(char, &keyP->_block),
XMLRPC_MEMBLOCK_SIZE(char, &keyP->_block)-1);
- if (index < 0)
+ if (xmIndex < 0)
*valuePP = NULL;
else {
_struct_member * const members =
XMLRPC_MEMBLOCK_CONTENTS(_struct_member, &structP->_block);
- *valuePP = members[index].value;
+ *valuePP = members[xmIndex].value;
XMLRPC_ASSERT_VALUE_OK(*valuePP);
@@ -487,7 +487,7 @@ xmlrpc_struct_set_value_v(xmlrpc_env * const envP,
char *key;
size_t key_len;
- int index;
+ int xmIndex;
_struct_member *members, *member, new_member;
xmlrpc_value *old_value;
@@ -501,14 +501,14 @@ xmlrpc_struct_set_value_v(xmlrpc_env * const envP,
key = XMLRPC_MEMBLOCK_CONTENTS(char, &keyvalP->_block);
key_len = XMLRPC_MEMBLOCK_SIZE(char, &keyvalP->_block) - 1;
- index = find_member(strctP, key, key_len);
+ xmIndex = find_member(strctP, key, key_len);
- if (index >= 0) {
+ if (xmIndex >= 0) {
/* Change the value of an existing member. (But be careful--the
** original and new values might be the same object, so watch
** the order of INCREF and DECREF calls!) */
members = XMLRPC_MEMBLOCK_CONTENTS(_struct_member, &strctP->_block);
- member = &members[index];
+ member = &members[xmIndex];
/* Juggle our references. */
old_value = member->value;
@@ -540,7 +540,7 @@ cleanup:
void
xmlrpc_struct_read_member(xmlrpc_env * const envP,
xmlrpc_value * const structP,
- unsigned int const index,
+ unsigned int const xmIndex,
xmlrpc_value ** const keyvalP,
xmlrpc_value ** const valueP) {
@@ -559,12 +559,12 @@ xmlrpc_struct_read_member(xmlrpc_env * const envP,
size_t const size =
XMLRPC_MEMBLOCK_SIZE(_struct_member, &structP->_block);
- if (index >= size)
+ if (xmIndex >= size)
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_INDEX_ERROR, "Index %u is beyond the end of "
- "the %u-member structure", index, (unsigned int)size);
+ "the %u-member structure", xmIndex, (unsigned int)size);
else {
- _struct_member * const memberP = &members[index];
+ _struct_member * const memberP = &members[xmIndex];
*keyvalP = memberP->key;
xmlrpc_INCREF(memberP->key);
*valueP = memberP->value;
@@ -578,7 +578,7 @@ xmlrpc_struct_read_member(xmlrpc_env * const envP,
void
xmlrpc_struct_get_key_and_value(xmlrpc_env * const envP,
xmlrpc_value * const structP,
- int const index,
+ int const xmIndex,
xmlrpc_value ** const keyvalP,
xmlrpc_value ** const valueP) {
/*----------------------------------------------------------------------------
@@ -592,11 +592,11 @@ xmlrpc_struct_get_key_and_value(xmlrpc_env * const envP,
XMLRPC_ASSERT_PTR_OK(keyvalP);
XMLRPC_ASSERT_PTR_OK(valueP);
- if (index < 0)
+ if (xmIndex < 0)
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_INDEX_ERROR, "Index %d is negative.");
else {
- xmlrpc_struct_read_member(envP, structP, index, keyvalP, valueP);
+ xmlrpc_struct_read_member(envP, structP, xmIndex, keyvalP, valueP);
if (!envP->fault_occurred) {
xmlrpc_DECREF(*keyvalP);
xmlrpc_DECREF(*valueP);