BIND 10 trac764, updated. a837df2e0c4858543c0bd2e420f726b89994a7e2 [trac764] minor editorial/style fixes: do not rely on conversion from pointer to bool; brace position; parentheses around return; constify a caught exception

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jul 7 21:02:24 UTC 2011


The branch, trac764 has been updated
       via  a837df2e0c4858543c0bd2e420f726b89994a7e2 (commit)
       via  0cd32b208c9a92e5e773b7874a3f75ee58abd6c0 (commit)
      from  551a2d7f6ed5744170265ea5bc7b99690b58a6f5 (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 a837df2e0c4858543c0bd2e420f726b89994a7e2
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Jul 7 11:20:24 2011 -0700

    [trac764] minor editorial/style fixes: do not rely on conversion from
    pointer to bool; brace position; parentheses around return; constify
    a caught exception

commit 0cd32b208c9a92e5e773b7874a3f75ee58abd6c0
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Jul 7 11:13:47 2011 -0700

    [trac764] minor doxygen fixes: add log/compiler to INPUT; make sure
    the overview will be the documentation for the file (not for a specific
    function)

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

Summary of changes:
 doc/Doxyfile                    |    4 ++--
 src/lib/log/compiler/message.cc |   34 ++++++++++++++++++----------------
 2 files changed, 20 insertions(+), 18 deletions(-)

-----------------------------------------------------------------------
diff --git a/doc/Doxyfile b/doc/Doxyfile
index b8a4656..ceb806f 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -570,8 +570,8 @@ WARN_LOGFILE           =
 
 INPUT                  = ../src/lib/cc ../src/lib/config \
     ../src/lib/cryptolink ../src/lib/dns ../src/lib/datasrc \
-    ../src/bin/auth ../src/bin/resolver ../src/lib/bench \
-    ../src/lib/log ../src/lib/asiolink/ ../src/lib/nsas \
+    ../src/bin/auth ../src/bin/resolver ../src/lib/bench ../src/lib/log \
+    ../src/lib/log/compiler ../src/lib/asiolink/ ../src/lib/nsas \
     ../src/lib/testutils ../src/lib/cache ../src/lib/server_common/ \
     ../src/bin/sockcreator/ ../src/lib/util/ \
     ../src/lib/resolve ../src/lib/acl
diff --git a/src/lib/log/compiler/message.cc b/src/lib/log/compiler/message.cc
index e280728..8bec794 100644
--- a/src/lib/log/compiler/message.cc
+++ b/src/lib/log/compiler/message.cc
@@ -43,6 +43,7 @@ using namespace isc::util;
 
 static const char* VERSION = "1.0-0";
 
+/// \file log/compiler/message.cc
 /// \brief Message Compiler
 ///
 /// \b Overview<BR>
@@ -109,7 +110,7 @@ currentTime() {
 
     // Convert to string and strip out the trailing newline
     string current_time = buffer;
-    return isc::util::str::trim(current_time);
+    return (isc::util::str::trim(current_time));
 }
 
 
@@ -130,7 +131,7 @@ sentinel(Filename& file) {
     string ext = file.extension();
     string sentinel_text = "__" + name + "_" + ext.substr(1);
     isc::util::str::uppercase(sentinel_text);
-    return sentinel_text;
+    return (sentinel_text);
 }
 
 
@@ -157,7 +158,7 @@ quoteString(const string& instring) {
         outstring += instring[i];
     }
 
-    return outstring;
+    return (outstring);
 }
 
 
@@ -180,7 +181,7 @@ sortedIdentifiers(MessageDictionary& dictionary) {
     }
     sort(ident.begin(), ident.end());
 
-    return ident;
+    return (ident);
 }
 
 
@@ -210,7 +211,7 @@ splitNamespace(string ns) {
 
     // ... and return the vector of namespace components split on the single
     // colon.
-    return isc::util::str::tokens(ns, ":");
+    return (isc::util::str::tokens(ns, ":"));
 }
 
 
@@ -261,10 +262,11 @@ writeClosingNamespace(ostream& output, const vector<string>& ns) {
 
 void
 writePythonFile(const string& file, MessageDictionary& dictionary,
-                const char* output_directory) {
+                const char* output_directory)
+{
     Filename message_file(file);
     Filename python_file(Filename(message_file.name()).useAsDefault(".py"));
-    if (output_directory) {
+    if (output_directory != NULL) {
         python_file.setDirectory(output_directory);
     }
 
@@ -311,7 +313,7 @@ writeHeaderFile(const string& file, const vector<string>& ns_components,
 {
     Filename message_file(file);
     Filename header_file(Filename(message_file.name()).useAsDefault(".h"));
-    if (output_directory) {
+    if (output_directory != NULL) {
         header_file.setDirectory(output_directory);
     }
 
@@ -544,15 +546,15 @@ main(int argc, char* argv[]) {
 
             case 'h':
                 usage();
-                return 0;
+                return (0);
 
             case 'v':
                 version();
-                return 0;
+                return (0);
 
             default:
                 // A message will have already been output about the error.
-                return 1;
+                return (1);
         }
     }
 
@@ -560,11 +562,11 @@ main(int argc, char* argv[]) {
     if (optind < (argc - 1)) {
         cout << "Error: excess arguments in command line\n";
         usage();
-        return 1;
+        return (1);
     } else if (optind >= argc) {
         cout << "Error: missing message file\n";
         usage();
-        return 1;
+        return (1);
     }
     string message_file = argv[optind];
 
@@ -604,7 +606,7 @@ main(int argc, char* argv[]) {
         // Finally, warn of any duplicates encountered.
         warnDuplicates(reader);
     }
-    catch (MessageException& e) {
+    catch (const MessageException& e) {
         // Create an error message from the ID and the text
         MessageDictionary& global = MessageDictionary::globalDictionary();
         string text = e.id();
@@ -618,9 +620,9 @@ main(int argc, char* argv[]) {
 
         cerr << text << "\n";
 
-        return 1;
+        return (1);
     }
 
-    return 0;
+    return (0);
 
 }




More information about the bind10-changes mailing list