]> git.sur5r.net Git - bacula/bacula/commitdiff
Remove global variable shadowing by local variable.
authorMarco van Wieringen <mvw@planets.elm.net>
Wed, 1 Jun 2011 08:46:17 +0000 (10:46 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:44:37 +0000 (14:44 +0200)
bacula/src/tools/dbcheck.c

index aff931df4bd0a301a93d1dd9d22c67216dc7373c..2744977cef923e7cd46910fb5371248ffd1a50eb 100644 (file)
@@ -340,7 +340,7 @@ int main (int argc, char *argv[])
 
 static void print_catalog_details(CAT *catalog, const char *working_dir)
 {
-   POOLMEM *buf = get_pool_memory(PM_MESSAGE);
+   POOLMEM *catalog_details = get_pool_memory(PM_MESSAGE);
 
    /*
     * Instantiate a B_DB class and see what db_type gets assigned to it.
@@ -351,11 +351,11 @@ static void print_catalog_details(CAT *catalog, const char *working_dir)
                          catalog->mult_db_connections,
                          catalog->disable_batch_insert);
    if (db) {
-      printf("%sdb_type=%s\nworking_dir=%s\n", catalog->display(buf),
+      printf("%sdb_type=%s\nworking_dir=%s\n", catalog->display(catalog_details),
              db->db_get_type(), working_directory);
       db_close_database(NULL, db);
    }
-   free_pool_memory(buf);
+   free_pool_memory(catalog_details);
 }
 
 static void do_interactive_mode()
@@ -505,9 +505,10 @@ static int print_name_handler(void *ctx, int num_fields, char **row)
 
 static int get_name_handler(void *ctx, int num_fields, char **row)
 {
-   POOLMEM *buf = (POOLMEM *)ctx;
+   POOLMEM *name = (POOLMEM *)ctx;
+
    if (row[0]) {
-      pm_strcpy(&buf, row[0]);
+      pm_strcpy(&name, row[0]);
    }
    return 0;
 }