List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:August 16 2010 2:11pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3679)
View as plain text  
#At file:///home/msvensson/mysql/7.0-seagull/ based on revid:magnus.blaudd@stripped

 3679 Magnus Blåudd	2010-08-16
      ndb
       - rename arguments to 'ndb_opt_set_usage_funcs' and 'ndb_short_usage_sub'
         to make clear that they don't use the global variable "my_progname"

    modified:
      storage/ndb/include/util/ndb_opts.h
      storage/ndb/src/common/util/ndb_opts.c
=== modified file 'storage/ndb/include/util/ndb_opts.h'
--- a/storage/ndb/include/util/ndb_opts.h	2010-08-16 10:15:43 +0000
+++ b/storage/ndb/include/util/ndb_opts.h	2010-08-16 14:11:09 +0000
@@ -120,7 +120,7 @@ enum ndb_std_options {
   NDB_STD_OPTIONS_LAST
 };
 
-void ndb_opt_set_usage_funcs(const char* my_progname,
+void ndb_opt_set_usage_funcs(const char* progname,
                              void (*short_usage)(void),
                              void (*usage)(void));
 my_bool
@@ -130,7 +130,7 @@ ndb_std_get_one_option(int optid,
 
 void ndb_usage(void (*usagefunc)(void), const char *load_default_groups[],
                struct my_option *my_long_options);
-void ndb_short_usage_sub(const char* my_progname, const char* extra);
+void ndb_short_usage_sub(const char* progname, const char* extra);
 
 
 #ifdef __cplusplus

=== modified file 'storage/ndb/src/common/util/ndb_opts.c'
--- a/storage/ndb/src/common/util/ndb_opts.c	2010-08-16 10:15:43 +0000
+++ b/storage/ndb/src/common/util/ndb_opts.c	2010-08-16 14:11:09 +0000
@@ -24,21 +24,21 @@ static void default_ndb_opt_usage(void)
 static void (*g_ndb_opt_short_usage)(void)= default_ndb_opt_short;
 static void (*g_ndb_opt_usage)(void)= default_ndb_opt_usage;
 
-void ndb_opt_set_usage_funcs(const char* my_progname,
+void ndb_opt_set_usage_funcs(const char* progname,
                              void (*short_usage)(void),
                              void (*usage)(void))
 {
-  if(my_progname)
-    g_ndb_opt_progname= (char*)my_progname;
+  if(progname)
+    g_ndb_opt_progname= progname;
   if(short_usage)
     g_ndb_opt_short_usage= short_usage;
   if(usage)
     g_ndb_opt_usage= usage;
 }
 
-void ndb_short_usage_sub(const char* my_progname, const char* extra)
+void ndb_short_usage_sub(const char* progname, const char* extra)
 {
-  printf("Usage: %s [OPTIONS]%s%s\n", my_progname,
+  printf("Usage: %s [OPTIONS]%s%s\n", progname,
          (extra)?" ":"",
          (extra)?extra:"");
 }

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20100816141109-vumapmpfcj7ximkw.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3679) Magnus Blåudd16 Aug