diff options
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/default.c | 38 | ||||
-rw-r--r-- | mysys/mf_iocache2.c | 26 | ||||
-rw-r--r-- | mysys/mf_keycache.c | 5 | ||||
-rw-r--r-- | mysys/my_bitmap.c | 6 | ||||
-rw-r--r-- | mysys/sha1.c | 12 |
5 files changed, 44 insertions, 43 deletions
diff --git a/mysys/default.c b/mysys/default.c index 97c52d01031..dc1c5a698b8 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -41,9 +41,9 @@ #include <winbase.h> #endif -const char *defaults_file=0; -const char *defaults_group_suffix=0; -char *defaults_extra_file=0; +const char *my_defaults_file=0; +const char *my_defaults_group_suffix=0; +char *my_defaults_extra_file=0; /* Which directories are searched for options (and in which order) */ @@ -116,7 +116,7 @@ static char *remove_end_comment(char *ptr); 0 ok 1 given cinf_file doesn't exist - The global variable 'defaults_group_suffix' is updated with value for + The global variable 'my_defaults_group_suffix' is updated with value for --defaults_group_suffix */ @@ -132,28 +132,28 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv, *args_used+= get_defaults_options(*argc - *args_used, *argv + *args_used, (char **) &forced_default_file, (char **) &forced_extra_defaults, - (char **) &defaults_group_suffix); + (char **) &my_defaults_group_suffix); - if (! defaults_group_suffix) - defaults_group_suffix= getenv(STRINGIFY_ARG(DEFAULT_GROUP_SUFFIX_ENV)); + if (! my_defaults_group_suffix) + my_defaults_group_suffix= getenv(STRINGIFY_ARG(DEFAULT_GROUP_SUFFIX_ENV)); if (forced_extra_defaults) - defaults_extra_file= (char *) forced_extra_defaults; + my_defaults_extra_file= (char *) forced_extra_defaults; if (forced_default_file) - defaults_file= forced_default_file; + my_defaults_file= forced_default_file; /* We can only handle 'defaults-group-suffix' if we are called from load_defaults() as otherwise we can't know the type of 'func_ctx' */ - if (defaults_group_suffix && func == handle_default_option) + if (my_defaults_group_suffix && func == handle_default_option) { /* Handle --defaults-group-suffix= */ uint i; const char **extra_groups; - const uint instance_len= strlen(defaults_group_suffix); + const uint instance_len= strlen(my_defaults_group_suffix); struct handle_option_ctx *ctx= (struct handle_option_ctx*) func_ctx; char *ptr; TYPELIB *group= ctx->group; @@ -176,7 +176,7 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv, /** Construct new group */ memcpy(ptr, extra_groups[i], len); - memcpy(ptr+len, defaults_group_suffix, instance_len+1); + memcpy(ptr+len, my_defaults_group_suffix, instance_len+1); } group->count*= 2; @@ -210,15 +210,15 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv, if (search_default_file(func, func_ctx, *dirs, conf_file) < 0) goto err; } - else if (defaults_extra_file) + else if (my_defaults_extra_file) { if ((error= search_default_file_with_ext(func, func_ctx, "", "", - defaults_extra_file, 0)) < 0) + my_defaults_extra_file, 0)) < 0) goto err; /* Fatal error */ if (error > 0) { fprintf(stderr, "Could not open required defaults file: %s\n", - defaults_extra_file); + my_defaults_extra_file); goto err; } } @@ -866,8 +866,8 @@ void my_print_default_files(const char *conf_file) char *end; if (**dirs) pos= *dirs; - else if (defaults_extra_file) - pos= defaults_extra_file; + else if (my_defaults_extra_file) + pos= my_defaults_extra_file; else continue; end= convert_dirname(name, pos, NullS); @@ -893,14 +893,14 @@ void print_defaults(const char *conf_file, const char **groups) fputs(*groups,stdout); } - if (defaults_group_suffix) + if (my_defaults_group_suffix) { groups= groups_save; for ( ; *groups ; groups++) { fputc(' ',stdout); fputs(*groups,stdout); - fputs(defaults_group_suffix,stdout); + fputs(my_defaults_group_suffix,stdout); } } puts("\nThe following options may be given as the first argument:\n\ diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c index 429954a9162..30e9f19a189 100644 --- a/mysys/mf_iocache2.c +++ b/mysys/mf_iocache2.c @@ -321,10 +321,10 @@ uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) if (*fmt == 's') /* String parameter */ { reg2 char *par = va_arg(args, char *); - uint length = (uint) strlen(par); + uint length2 = (uint) strlen(par); /* TODO: implement minimum width and precision */ - out_length+=length; - if (my_b_write(info, par, length)) + out_length+= length2; + if (my_b_write(info, par, length2)) goto err; } else if (*fmt == 'b') /* Sized buffer parameter, only precision makes sense */ @@ -337,32 +337,32 @@ uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ { register int iarg; - uint length; + uint length2; char buff[17]; iarg = va_arg(args, int); if (*fmt == 'd') - length= (uint) (int10_to_str((long) iarg,buff, -10) - buff); + length2= (uint) (int10_to_str((long) iarg,buff, -10) - buff); else - length= (uint) (int10_to_str((long) (uint) iarg,buff,10)- buff); - out_length+=length; - if (my_b_write(info, buff, length)) + length2= (uint) (int10_to_str((long) (uint) iarg,buff,10)- buff); + out_length+= length2; + if (my_b_write(info, buff, length2)) goto err; } else if ((*fmt == 'l' && fmt[1] == 'd') || fmt[1] == 'u') /* long parameter */ { register long iarg; - uint length; + uint length2; char buff[17]; iarg = va_arg(args, long); if (*++fmt == 'd') - length= (uint) (int10_to_str(iarg,buff, -10) - buff); + length2= (uint) (int10_to_str(iarg,buff, -10) - buff); else - length= (uint) (int10_to_str(iarg,buff,10)- buff); - out_length+=length; - if (my_b_write(info, buff, length)) + length2= (uint) (int10_to_str(iarg,buff,10)- buff); + out_length+= length2; + if (my_b_write(info, buff, length2)) goto err; } else diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index 3c4197f847e..0762d10ab08 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -840,9 +840,10 @@ static inline void link_changed(BLOCK_LINK *block, BLOCK_LINK **phead) */ static void link_to_file_list(KEY_CACHE *keycache, - BLOCK_LINK *block, int file, my_bool unlink) + BLOCK_LINK *block, int file, + my_bool unlink_block) { - if (unlink) + if (unlink_block) unlink_changed(block); link_changed(block, &keycache->file_blocks[FILE_HASH(file)]); if (block->status & BLOCK_CHANGED) diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c index 2cf16111f67..beb67bb419b 100644 --- a/mysys/my_bitmap.c +++ b/mysys/my_bitmap.c @@ -123,10 +123,10 @@ void bitmap_set_bit(MY_BITMAP *map, uint bitmap_bit) my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit) { - uchar *byte= map->bitmap + (bitmap_bit / 8); + uchar *value= map->bitmap + (bitmap_bit / 8); uchar bit= 1 << ((bitmap_bit) & 7); - uchar res= (*byte) & bit; - *byte|= bit; + uchar res= (*value) & bit; + *value|= bit; return res; } diff --git a/mysys/sha1.c b/mysys/sha1.c index 6328ed285d6..3469e480c26 100644 --- a/mysys/sha1.c +++ b/mysys/sha1.c @@ -244,7 +244,7 @@ static void SHA1ProcessMessageBlock(SHA1_CONTEXT *context) uint32 temp; /* Temporary word value */ uint32 W[80]; /* Word sequence */ uint32 A, B, C, D, E; /* Word buffers */ - int index; + int idx; /* Initialize the first 16 words in the array W @@ -252,11 +252,11 @@ static void SHA1ProcessMessageBlock(SHA1_CONTEXT *context) for (t = 0; t < 16; t++) { - index=t*4; - W[t] = context->Message_Block[index] << 24; - W[t] |= context->Message_Block[index + 1] << 16; - W[t] |= context->Message_Block[index + 2] << 8; - W[t] |= context->Message_Block[index + 3]; + idx=t*4; + W[t] = context->Message_Block[idx] << 24; + W[t] |= context->Message_Block[idx + 1] << 16; + W[t] |= context->Message_Block[idx + 2] << 8; + W[t] |= context->Message_Block[idx + 3]; } |