summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2018-09-04 16:40:44 +0200
committerpgen <p.gen.progs@gmail.com>2018-09-04 16:43:06 +0200
commit476391f161bb559ba8a488e6074d9c4087f69ffd (patch)
tree59f0ea6a56ff92bb66f0953279f3ea170cf61492
parent0a2a590474df09e8ec42d0d00d321aa58900c7b9 (diff)
Fix a potential variable naming collision
-rw-r--r--smenu.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/smenu.c b/smenu.c
index 0bd84ed..c8b6e5c 100644
--- a/smenu.c
+++ b/smenu.c
@@ -4821,11 +4821,11 @@ get_word(FILE * input, ll_t * word_delims_list, ll_t * record_delims_list,
{
char * temp = NULL;
int byte;
- long count = 0; /* count chars used in current allocation */
- long wordsize; /* size of current allocation in chars */
- int is_dquote; /* double quote presence indicator */
- int is_squote; /* single quote presence indicator */
- int is_special; /* a character is special after a \ */
+ long mb_count = 0; /* count chars used in current allocation */
+ long wordsize; /* size of current allocation in chars */
+ int is_dquote; /* double quote presence indicator */
+ int is_squote; /* single quote presence indicator */
+ int is_special; /* a character is special after a \ */
/* Skip leading delimiters */
/* """"""""""""""""""""""" */
@@ -4846,7 +4846,7 @@ get_word(FILE * input, ll_t * word_delims_list, ll_t * record_delims_list,
/* Start stashing bytes. Stop when we meet a non delimiter or EOF */
/* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
- count = 0;
+ mb_count = 0;
is_dquote = 0;
is_squote = 0;
is_special = 0;
@@ -4855,7 +4855,7 @@ get_word(FILE * input, ll_t * word_delims_list, ll_t * record_delims_list,
{
size_t i = 0;
- if (count >= limits->word_length)
+ if (mb_count >= limits->word_length)
{
fprintf(stderr,
"A word's length has reached the limit "
@@ -4954,11 +4954,11 @@ get_word(FILE * input, ll_t * word_delims_list, ll_t * record_delims_list,
/* """"""""""""""""""""""""""""""""""""""" */
while (mb_buffer[i] != '\0')
{
- if (count >= wordsize - 1)
+ if (mb_count >= wordsize - 1)
temp = xrealloc(temp,
- wordsize += (count / CHARSCHUNK + 1) * CHARSCHUNK);
+ wordsize += (mb_count / CHARSCHUNK + 1) * CHARSCHUNK);
- *(temp + count++) = mb_buffer[i];
+ *(temp + mb_count++) = mb_buffer[i];
i++;
}
@@ -4970,7 +4970,7 @@ get_word(FILE * input, ll_t * word_delims_list, ll_t * record_delims_list,
/* Nul-terminate the word to make it a string */
/* """""""""""""""""""""""""""""""""""""""""" */
- *(temp + count) = '\0';
+ *(temp + mb_count) = '\0';
/* Replace the UTF-8 ASCII representations in the word just */
/* read by their binary values. */