- Uses memset() to initialize a buffer
Change-Id: I4a51276c65d8d4075ede631dd4c19c4c16692901
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
#define _GNU_SOURCE
#endif
+#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <aul.h>
std::string FdBroker::GetInterfaceName(const std::string& target_appid,
const std::string& port_name) {
std::string interface_name = target_appid + "_" + port_name;
- char c_buf[interface_name.length() * 2 + 1] = {0};
+ char c_buf[interface_name.length() * 2 + 1];
char* temp = &c_buf[0];
-
+ memset(c_buf, 0, sizeof(c_buf));
for (unsigned int index = 0; index < interface_name.length(); index++) {
snprintf(temp, 3, "%02x", interface_name[index]);
temp += 2;