Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
ef610433
Commit
ef610433
authored
Feb 17, 2018
by
octal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Not using TRY_RET anymore for inet_ntoa as it returns a pointer
parent
23f211c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/common/net.cc
src/common/net.cc
+4
-2
No files found.
src/common/net.cc
View file @
ef610433
...
...
@@ -84,11 +84,13 @@ Address::Address(Ipv4 ip, Port port)
Address
Address
::
fromUnix
(
struct
sockaddr
*
addr
)
{
struct
sockaddr_in
*
in_addr
=
reinterpret_cast
<
struct
sockaddr_in
*>
(
addr
);
std
::
string
host
=
TRY_RET
(
inet_ntoa
(
in_addr
->
sin_addr
));
char
*
host
=
inet_ntoa
(
in_addr
->
sin_addr
);
assert
(
addr
);
int
port
=
ntohs
(
in_addr
->
sin_port
);
return
Address
(
std
::
move
(
host
)
,
port
);
return
Address
(
host
,
port
);
}
std
::
string
...
...
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