You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2012/08/10 15:45:50 UTC

git commit: Catch up with clang/trunk's definition of clean code:

Updated Branches:
  refs/heads/master b0c74c9a5 -> 58205af14


Catch up with clang/trunk's definition of clean code:

replace '\0' with NULL where a char* is used.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/58205af1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/58205af1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/58205af1

Branch: refs/heads/master
Commit: 58205af144596f806a7c8ac3373fc84430ec1b3b
Parents: b0c74c9
Author: Igor Galić <i....@brainsware.org>
Authored: Fri Aug 10 15:43:31 2012 +0200
Committer: Igor Galić <i....@brainsware.org>
Committed: Fri Aug 10 15:43:31 2012 +0200

----------------------------------------------------------------------
 mgmt/api/remote/NetworkUtilsRemote.cc |    2 +-
 mgmt/tools/ConfigAPI.cc               |   18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/58205af1/mgmt/api/remote/NetworkUtilsRemote.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/remote/NetworkUtilsRemote.cc b/mgmt/api/remote/NetworkUtilsRemote.cc
index fc5d1c3..0dc809a 100644
--- a/mgmt/api/remote/NetworkUtilsRemote.cc
+++ b/mgmt/api/remote/NetworkUtilsRemote.cc
@@ -1631,7 +1631,7 @@ parse_event_notification(int fd, TSEvent * event)
   OpType msg_type;
   int16_t type_op;
   int32_t msg_len;
-  char *event_name = NUL, *desc = NULL;
+  char *event_name = NULL, *desc = NULL;
 
   if (!event)
     return TS_ERR_PARAMS;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/58205af1/mgmt/tools/ConfigAPI.cc
----------------------------------------------------------------------
diff --git a/mgmt/tools/ConfigAPI.cc b/mgmt/tools/ConfigAPI.cc
index 67e0bb9..19afe7a 100644
--- a/mgmt/tools/ConfigAPI.cc
+++ b/mgmt/tools/ConfigAPI.cc
@@ -604,7 +604,7 @@ Config_SaveVersion(char *file)
   len = sizeof("Version") + 1;
   parentAttributes3[1] = new char[len];
   snprintf(parentAttributes3[1], len, "%s", "Version");
-  parentAttributes3[2] = '\0';
+  parentAttributes3[2] = NULL;
   child2->setAttributes(parentAttributes3);
   child2->setNodeName("CONFIG_TYPE");
 
@@ -857,7 +857,7 @@ Config_SaveNetConfig(char *file)
   len = sizeof("Version") + 1;
   parentAttributes3[1] = new char[len];
   snprintf(parentAttributes3[1], len, "%s", "Version");
-  parentAttributes3[2] = '\0';
+  parentAttributes3[2] = NULL;
   child2->setAttributes(parentAttributes3);
   child2->setNodeName("CONFIG_TYPE");
 
@@ -882,7 +882,7 @@ Config_SaveNetConfig(char *file)
   len = sizeof("NW Settings") + 1;
   parentAttributes[1] = new char[len];
   snprintf(parentAttributes[1], len, "%s", "NW Settings");
-  parentAttributes[2] = '\0';
+  parentAttributes[2] = NULL;
   child->setAttributes(parentAttributes);
   child->setNodeName("CONFIG_TYPE");
 
@@ -919,7 +919,7 @@ Config_SaveNetConfig(char *file)
       attributes[0] = new char[len];
       snprintf(attributes[0], len, "%s", "InterfaceName");
       attributes[1] = Int;
-      attributes[2] = '\0';
+      attributes[2] = NULL;
       PerNICDefaultGateway->setAttributes(attributes);
       child->AppendChild(PerNICDefaultGateway);
     }
@@ -937,7 +937,7 @@ Config_SaveNetConfig(char *file)
       attributes[0] = new char[len];
       snprintf(attributes[0], len, "%s", "InterfaceName");
       attributes[1] = Int;
-      attributes[2] = '\0';
+      attributes[2] = NULL;
       InterfaceIPAddress->setAttributes(attributes);
       child->AppendChild(InterfaceIPAddress);
     }
@@ -955,7 +955,7 @@ Config_SaveNetConfig(char *file)
       attributes[0] = new char[len];
       snprintf(attributes[0], len, "%s", "InterfaceName");
       attributes[1] = Int;
-      attributes[2] = '\0';
+      attributes[2] = NULL;
       InterfaceNetmask->setAttributes(attributes);
       child->AppendChild(InterfaceNetmask);
     }
@@ -985,7 +985,7 @@ Config_SaveNetConfig(char *file)
        sprintf(attributes[0], "%s", "DomainControllerOrder");
        attributes[1] = new char[sizeof(int)+1];;
        sprintf(attributes[1], "%d", index+1);
-       attributes[2] = '\0';
+       attributes[2] = NULL;
        DNSSearch->setAttributes(attributes);
        child->AppendChild(DNSSearch);
      }
@@ -1010,7 +1010,7 @@ Config_SaveNetConfig(char *file)
       len = sizeof(int) + 1;
       attributes[1] = new char[len];;
       snprintf(attributes[1], len, "%d", index + 1);
-      attributes[2] = '\0';
+      attributes[2] = NULL;
       DNSServer->setAttributes(attributes);
       child->AppendChild(DNSServer);
     }
@@ -1034,7 +1034,7 @@ Config_SaveNetConfig(char *file)
   len = sizeof("OS Settings") + 1;
   parentAttributes1[1] = new char[len];
   snprintf(parentAttributes1[1], len, "%s", "OS Settings");
-  parentAttributes1[2] = '\0';
+  parentAttributes1[2] = NULL;
   child1->setAttributes(parentAttributes1);
   child1->setNodeName("CONFIG_TYPE");