Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
9dba2435
Commit
9dba2435
authored
Dec 24, 2017
by
Mihai Moldovan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxcomp/src/ChannelEndPoint.cpp: don't use C-style casting in C++ code...
parent
ae73fedf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ChannelEndPoint.cpp
nxcomp/src/ChannelEndPoint.cpp
+3
-3
No files found.
nxcomp/src/ChannelEndPoint.cpp
View file @
9dba2435
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment