BIND 10 trac1324, updated. a4c51111cc0fc28c6517a11f8ae88682ab8e6996 [1324] Changed progName to #define PROGNAME Changed version to VERSION Make dk_diag_mask static

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Nov 14 18:57:52 UTC 2011


The branch, trac1324 has been updated
       via  a4c51111cc0fc28c6517a11f8ae88682ab8e6996 (commit)
      from  0ad9b8c8482a134af7c47b64b412f642d08ce642 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a4c51111cc0fc28c6517a11f8ae88682ab8e6996
Author: John DuBois <johnd at isc.org>
Date:   Mon Nov 14 10:54:43 2011 -0800

    [1324]
    Changed progName to #define PROGNAME
    Changed version to VERSION
    Make dk_diag_mask static

-----------------------------------------------------------------------

Summary of changes:
 tests/tools/perfdhcp/cloptions.cc |   22 ++++++++++------------
 tests/tools/perfdhcp/dkdebug.cc   |    2 +-
 tests/tools/perfdhcp/perfdhcp.h   |    2 +-
 3 files changed, 12 insertions(+), 14 deletions(-)

-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/cloptions.cc b/tests/tools/perfdhcp/cloptions.cc
index dc93974..46346f0 100644
--- a/tests/tools/perfdhcp/cloptions.cc
+++ b/tests/tools/perfdhcp/cloptions.cc
@@ -24,9 +24,7 @@ static void printHelp(const char* progName, const char* usage);
 static void initialize(void);
 
 // The current version information
-static const char* version = "dhcpperf v1.0 2011-10-30";
-
-const char progName[] = "dhcpperf";
+const char* VERSION = "perfdhcp v1.0 2011-10-30";
 
 static int v6 = 0;                      // DHCPv6 operation (-6)
 static int initialOnly = 0;             // Do only initial exchange (-i)
@@ -85,18 +83,18 @@ perfdhcp [-hv] [-4|-6] [-r<rate>] [-n<num-request>] [-p<test-period>]\n\
 
     initialize();
     /* Process command line options */
-    msg = procOpts(&argc, &argv, optConf, NULL, progName, NULL);
+    msg = procOpts(&argc, &argv, optConf, NULL, PROGNAME, NULL);
     if (msg != NULL) {
-        fprintf(stderr, "%s: %s\n", progName, msg);
+        fprintf(stderr, "%s: %s\n", PROGNAME, msg);
         return(2);
     }
 
     if (help) {
-        printHelp(progName, usage);
+        printHelp(PROGNAME, usage);
         return(0);
     }
     if (versionReq) {
-        printf("%s\n", version);
+        printf("%s\n", VERSION);
         return(0);
     }
     if (diagStr != NULL) {
@@ -104,13 +102,13 @@ perfdhcp [-hv] [-4|-6] [-r<rate>] [-n<num-request>] [-p<test-period>]\n\
         if ((c = dk_setup(diagStr, diagLetters)) != '\0') {
             fprintf(stderr,
                     "%s: Invalid selector character given with -x: '%c'\n",
-                    progName, c);
+                    PROGNAME, c);
             return(2);
         }
     }
 
     if (v4 && v6) {
-        fprintf(stderr, "%s: Must not give -4 and -6 together.\n", progName);
+        fprintf(stderr, "%s: Must not give -4 and -6 together.\n", PROGNAME);
         return(2);
     }
     switch (argc) {
@@ -121,11 +119,11 @@ perfdhcp [-hv] [-4|-6] [-r<rate>] [-n<num-request>] [-p<test-period>]\n\
             if (v6) {
                 fprintf(stderr,
                         "%s: Use -l to specify an interface name.\n\%s\n",
-                        progName, usage);
+                        PROGNAME, usage);
             }
             else {
                 fprintf(stderr, "%s: Must specify a DHCP server.\n\%s\n",
-                        progName, usage);
+                        PROGNAME, usage);
             }
             return(2);
         }
@@ -134,7 +132,7 @@ perfdhcp [-hv] [-4|-6] [-r<rate>] [-n<num-request>] [-p<test-period>]\n\
         server = argv[0];
         break;
     default:
-        fprintf(stderr, "%s: Too many arguments.\n\%s\n", progName, usage);
+        fprintf(stderr, "%s: Too many arguments.\n\%s\n", PROGNAME, usage);
         return(2);
     }
     return(1);
diff --git a/tests/tools/perfdhcp/dkdebug.cc b/tests/tools/perfdhcp/dkdebug.cc
index 4887c0c..88f62dd 100644
--- a/tests/tools/perfdhcp/dkdebug.cc
+++ b/tests/tools/perfdhcp/dkdebug.cc
@@ -22,7 +22,7 @@
  * The set of diagnostic bits set by dk_setup(), and used by the other
  * functions to test offered diagnostics against.
  */
-unsigned dk_diag_mask = 0;
+static unsigned dk_diag_mask = 0;
 
 char
 dk_setup(const char* diag_str, const struct dkdesc* diags) {
diff --git a/tests/tools/perfdhcp/perfdhcp.h b/tests/tools/perfdhcp/perfdhcp.h
index ebca39b..c957187 100644
--- a/tests/tools/perfdhcp/perfdhcp.h
+++ b/tests/tools/perfdhcp/perfdhcp.h
@@ -21,7 +21,7 @@
 extern "C" {
 #endif
 
-extern const char progName[];
+#define PROGNAME "perfdhcp"
 
 /*
  * The masks associated with keyletters, used in dkdesc structures for setup




More information about the bind10-changes mailing list