aboutsummaryrefslogtreecommitdiff
path: root/nxcomp
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-12-24 17:59:35 +0100
committerMihai Moldovan <ionic@ionic.de>2017-12-24 18:05:06 +0100
commit9dba2435ccc9cc5f92066de4e2e2be1d4585bc9f (patch)
tree7c49068ee31783bd417eb19c9af07b23a8a8b5cf /nxcomp
parentae73fedf8e168e6d617e923ea022e16064c8cc4e (diff)
downloadnx-libs-9dba2435ccc9cc5f92066de4e2e2be1d4585bc9f.tar.gz
nx-libs-9dba2435ccc9cc5f92066de4e2e2be1d4585bc9f.tar.bz2
nx-libs-9dba2435ccc9cc5f92066de4e2e2be1d4585bc9f.zip
nxcomp/src/ChannelEndPoint.cpp: don't use C-style casting in C++ code...
Diffstat (limited to 'nxcomp')
-rw-r--r--nxcomp/src/ChannelEndPoint.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/nxcomp/src/ChannelEndPoint.cpp b/nxcomp/src/ChannelEndPoint.cpp
index fb8549f6a..a1d96086a 100644
--- a/nxcomp/src/ChannelEndPoint.cpp
+++ b/nxcomp/src/ChannelEndPoint.cpp
@@ -103,11 +103,11 @@ ChannelEndPoint::setSpec(const char *hostName, long port) {
if (hostName && strlen(hostName) && port >= 1)
{
length = snprintf(NULL, 0, "tcp:%s:%ld", hostName, port);
- spec_ = (char *)calloc(length + 1, sizeof(char));
+ spec_ = static_cast<char *>(calloc(length + 1, sizeof(char)));
snprintf(spec_, length+1, "tcp:%s:%ld", hostName, port);
isTCP_ = true;
}
- else setSpec((char*)NULL);
+ else setSpec(static_cast<char*>(NULL));
}
bool
@@ -133,7 +133,7 @@ ChannelEndPoint::getSpec(char **socketUri) const {
if (length > 0)
{
- newSocketUri = (char *)calloc(length + 1, sizeof(char));
+ newSocketUri = static_cast<char *>(calloc(length + 1, sizeof(char)));
if (isUnixSocket())
snprintf(newSocketUri, length+1, "unix:%s", unixPath);
else