]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/disk/ldm.c: Rename variables and arguments to prevent
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 18 Oct 2013 14:54:57 +0000 (16:54 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 18 Oct 2013 14:54:57 +0000 (16:54 +0200)
shadowing.
* grub-core/kern/disk.c: Likewise.
* grub-core/kern/misc.c: Likewise.
* include/grub/parser.h: Likewise.
* include/grub/script_sh.h: Likewise.
* include/grub/zfs/zfs.h: Likewise.

ChangeLog
grub-core/disk/ldm.c
grub-core/kern/disk.c
grub-core/kern/misc.c
include/grub/parser.h
include/grub/script_sh.h
include/grub/zfs/zfs.h

index b2808c324e4e85ddffb53b4a7fe0bfc46e69c63e..5e9314ed3e018d4e278716a0f9f7a07c5dd9d58e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-10-18  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/disk/ldm.c: Rename variables and arguments to prevent
+       shadowing.
+       * grub-core/kern/disk.c: Likewise.
+       * grub-core/kern/misc.c: Likewise.
+       * include/grub/parser.h: Likewise.
+       * include/grub/script_sh.h: Likewise.
+       * include/grub/zfs/zfs.h: Likewise.
+
 2013-10-18  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/disk/luks.c (configure_ciphers): Fix spurious warning.
index a2e26b26268cbf1e6885f6c2a715734719dc67b1..f681eea7fe0a9d83e25cd5e2822157a1f7b6708b 100644 (file)
@@ -707,16 +707,16 @@ make_vg (grub_disk_t disk,
 
          if (comp->segment_alloc == 1)
            {
-             unsigned index;
+             unsigned node_index;
              ptr += *ptr + 1;
              if (ptr + *ptr + 1 >= vblk[i].dynamic
                  + sizeof (vblk[i].dynamic))
                {
                  goto fail2;
                }
-             index = read_int (ptr + 1, *ptr);
-             if (index < comp->segments->node_count)
-               comp->segments->nodes[index] = part;
+             node_index = read_int (ptr + 1, *ptr);
+             if (node_index < comp->segments->node_count)
+               comp->segments->nodes[node_index] = part;
            }
          else
            {
index 76ff4505ddb3da63ed059b0470822b68a852ec88..b58158eeb0696736a89ef0a6be3e4ab40a4885ea 100644 (file)
@@ -72,12 +72,12 @@ static void
 grub_disk_cache_invalidate (unsigned long dev_id, unsigned long disk_id,
                            grub_disk_addr_t sector)
 {
-  unsigned index;
+  unsigned cache_index;
   struct grub_disk_cache *cache;
 
   sector &= ~(GRUB_DISK_CACHE_SIZE - 1);
-  index = grub_disk_cache_get_index (dev_id, disk_id, sector);
-  cache = grub_disk_cache_table + index;
+  cache_index = grub_disk_cache_get_index (dev_id, disk_id, sector);
+  cache = grub_disk_cache_table + cache_index;
 
   if (cache->dev_id == dev_id && cache->disk_id == disk_id
       && cache->sector == sector && cache->data)
@@ -111,10 +111,10 @@ grub_disk_cache_fetch (unsigned long dev_id, unsigned long disk_id,
                       grub_disk_addr_t sector)
 {
   struct grub_disk_cache *cache;
-  unsigned index;
+  unsigned cache_index;
 
-  index = grub_disk_cache_get_index (dev_id, disk_id, sector);
-  cache = grub_disk_cache_table + index;
+  cache_index = grub_disk_cache_get_index (dev_id, disk_id, sector);
+  cache = grub_disk_cache_table + cache_index;
 
   if (cache->dev_id == dev_id && cache->disk_id == disk_id
       && cache->sector == sector)
@@ -138,10 +138,10 @@ grub_disk_cache_unlock (unsigned long dev_id, unsigned long disk_id,
                        grub_disk_addr_t sector)
 {
   struct grub_disk_cache *cache;
-  unsigned index;
+  unsigned cache_index;
 
-  index = grub_disk_cache_get_index (dev_id, disk_id, sector);
-  cache = grub_disk_cache_table + index;
+  cache_index = grub_disk_cache_get_index (dev_id, disk_id, sector);
+  cache = grub_disk_cache_table + cache_index;
 
   if (cache->dev_id == dev_id && cache->disk_id == disk_id
       && cache->sector == sector)
@@ -152,11 +152,11 @@ static grub_err_t
 grub_disk_cache_store (unsigned long dev_id, unsigned long disk_id,
                       grub_disk_addr_t sector, const char *data)
 {
-  unsigned index;
+  unsigned cache_index;
   struct grub_disk_cache *cache;
 
-  index = grub_disk_cache_get_index (dev_id, disk_id, sector);
-  cache = grub_disk_cache_table + index;
+  cache_index = grub_disk_cache_get_index (dev_id, disk_id, sector);
+  cache = grub_disk_cache_table + cache_index;
 
   cache->lock = 1;
   grub_free (cache->data);
index 027bfde9202153adce505804f4d5ec632ee0ea7f..c2a9163a34154fb19bb33f374c992435fd57109e 100644 (file)
@@ -641,7 +641,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
   const char *fmt;
   auto void write_char (unsigned char ch);
   auto void write_str (const char *s);
-  auto void write_fill (const char ch, int n);
+  auto void write_fill (const char ch, int count_fill);
 
   void write_char (unsigned char ch)
     {
index bf9c7c67da9b47a0e3dbdc437a638cdf9577ebb3..64f9f5cc20faf6c56c914fe72db60e576ffc713f 100644 (file)
@@ -62,8 +62,8 @@ EXPORT_FUNC (grub_parser_cmdline_state) (grub_parser_state_t state,
 
 grub_err_t
 EXPORT_FUNC (grub_parser_split_cmdline) (const char *cmdline,
-                                        grub_reader_getline_t getline,
-                                        void *getline_data,
+                                        grub_reader_getline_t getline_func,
+                                        void *getline_func_data,
                                         int *argc, char ***argv);
 
 struct grub_parser
@@ -81,7 +81,8 @@ struct grub_parser
   grub_err_t (*fini) (void);
 
   grub_err_t (*parse_line) (char *line,
-                           grub_reader_getline_t getline, void *getline_data);
+                           grub_reader_getline_t getline_func,
+                           void *getline_func_data);
 };
 typedef struct grub_parser *grub_parser_t;
 
@@ -89,6 +90,7 @@ grub_err_t grub_parser_execute (char *source);
 
 grub_err_t
 grub_rescue_parse_line (char *line,
-                       grub_reader_getline_t getline, void *getline_data);
+                       grub_reader_getline_t getline_func,
+                       void *getline_func_data);
 
 #endif /* ! GRUB_PARSER_HEADER */
index 57bdd4d3ce4d66346562c38d1656c14f870d48bd..360c2be1f05ae3e0e3b8b81d9bd575e18b26099e 100644 (file)
@@ -290,16 +290,16 @@ grub_script_arg_add (struct grub_parser_param *state,
                     grub_script_arg_type_t type, char *str);
 
 struct grub_script *grub_script_parse (char *script,
-                                      grub_reader_getline_t getline,
-                                      void *getline_data);
+                                      grub_reader_getline_t getline_func,
+                                      void *getline_func_data);
 void grub_script_free (struct grub_script *script);
 struct grub_script *grub_script_create (struct grub_script_cmd *cmd,
                                        struct grub_script_mem *mem);
 
 struct grub_lexer_param *grub_script_lexer_init (struct grub_parser_param *parser,
                                                 char *script,
-                                                grub_reader_getline_t getline,
-                                                void *getline_data);
+                                                grub_reader_getline_t getline_func,
+                                                void *getline_func_data);
 void grub_script_lexer_fini (struct grub_lexer_param *);
 void grub_script_lexer_ref (struct grub_lexer_param *);
 void grub_script_lexer_deref (struct grub_lexer_param *);
@@ -387,7 +387,8 @@ grub_script_execute_arglist_to_argv (struct grub_script_arglist *arglist, int *c
 
 grub_err_t
 grub_normal_parse_line (char *line,
-                       grub_reader_getline_t getline, void *getline_data);
+                       grub_reader_getline_t getline_func,
+                       void *getline_func_data);
 
 static inline struct grub_script *
 grub_script_ref (struct grub_script *script)
index 8bf09197429056f6d194eb87783f15750640fc5d..4ee513887ed6a329cd94124881b81486184434de 100644 (file)
@@ -131,7 +131,7 @@ int grub_zfs_nvlist_lookup_uint64 (const char *nvlist, const char *name,
                                   grub_uint64_t *out);
 char *grub_zfs_nvlist_lookup_nvlist_array (const char *nvlist,
                                           const char *name,
-                                          grub_size_t index);
+                                          grub_size_t array_index);
 int grub_zfs_nvlist_lookup_nvlist_array_get_nelm (const char *nvlist,
                                                  const char *name);
 grub_err_t