[Common] Removed unnecessary TODO.
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 8 Oct 2015 13:32:35 +0000 (15:32 +0200)
committerHyunJin Park <hj.na.park@samsung.com>
Mon, 12 Oct 2015 00:57:31 +0000 (09:57 +0900)
[Verification] Code compiles, logic was not modified.

Change-Id: I508b873f2300ef68cbd18e0d57865ff667bb1d39
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/common/dbus_operation.cc

index 2be8300223559d97be819a827f87368c94c02820..c100397f207e808a5d560eccbbb1b58a9b1b86c9 100755 (executable)
@@ -104,7 +104,8 @@ void DBusOperationArguments::AddArgumentString(const std::string& val) {
     const int length = val.length();
 
     char* p_val = new char[length+1];
-    strncpy(p_val, val.c_str(), length+1); // TODO: is it safe?
+    // copy 'length' characters and add a NULL-character at 'length+1' position
+    strncpy(p_val, val.c_str(), length+1);
 
     arguments_.push_back(ArgumentElement(ArgType::kTypeString, p_val));
 }