aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2008-06-23 20:32:50 +0000
committerGuy Harris <guy@alum.mit.edu>2008-06-23 20:32:50 +0000
commit6b762c78a500d44eb87db3e621b3efef3b50846c (patch)
tree3c0620a0926632afd7e74b09e560b50935d0db09 /util.c
parent256552f6a39c248666257c5cdea4718460d5e342 (diff)
Rename a variable to avoid collisions with a global variable, as noted
by John Smith. svn path=/trunk/; revision=25548
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util.c b/util.c
index 1b466cf098..5d25e43620 100644
--- a/util.c
+++ b/util.c
@@ -48,7 +48,7 @@
* separated by spaces.
*/
char *
-get_args_as_string(int argc, char **argv, int optind)
+get_args_as_string(int argc, char **argv, int optindex)
{
int len;
int i;
@@ -58,7 +58,7 @@ get_args_as_string(int argc, char **argv, int optind)
* Find out how long the string will be.
*/
len = 0;
- for (i = optind; i < argc; i++) {
+ for (i = optindex; i < argc; i++) {
len += strlen(argv[i]);
len++; /* space, or '\0' if this is the last argument */
}
@@ -72,7 +72,7 @@ get_args_as_string(int argc, char **argv, int optind)
* Now construct the string.
*/
argstring[0] = '\0';
- i = optind;
+ i = optindex;
for (;;) {
g_strlcat(argstring, argv[i], len);
i++;