Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
8a912ea3
Commit
8a912ea3
authored
Apr 07, 2017
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply a few clang-tidy cppcoreguidelines-* fixes
parent
0dfeb5a9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
src/main.cpp
src/main.cpp
+1
-1
src/network/poller.cpp
src/network/poller.cpp
+1
-1
src/network/tcp_client_socket_handler.cpp
src/network/tcp_client_socket_handler.cpp
+3
-3
src/utils/system.cpp
src/utils/system.cpp
+1
-1
src/xmpp/xmpp_parser.hpp
src/xmpp/xmpp_parser.hpp
+1
-1
No files found.
src/main.cpp
View file @
8a912ea3
...
...
@@ -99,7 +99,7 @@ int main(int ac, char** av)
// Block the signals we want to manage. They will be unblocked only during
// the epoll_pwait or ppoll calls. This avoids some race conditions,
// explained in man 2 pselect on linux
sigset_t
mask
;
sigset_t
mask
{}
;
sigemptyset
(
&
mask
);
sigaddset
(
&
mask
,
SIGINT
);
sigaddset
(
&
mask
,
SIGTERM
);
...
...
src/network/poller.cpp
View file @
8a912ea3
...
...
@@ -198,7 +198,7 @@ int Poller::poll(const std::chrono::milliseconds& timeout)
static
const
size_t
max_events
=
12
;
struct
epoll_event
revents
[
max_events
];
// Unblock all signals, only during the epoll_pwait call
sigset_t
empty_signal_set
;
sigset_t
empty_signal_set
{}
;
sigemptyset
(
&
empty_signal_set
);
const
int
nb_events
=
::
epoll_pwait
(
this
->
epfd
,
revents
,
max_events
,
timeout
.
count
(),
&
empty_signal_set
);
...
...
src/network/tcp_client_socket_handler.cpp
View file @
8a912ea3
...
...
@@ -35,7 +35,7 @@ void TCPClientSocketHandler::init_socket(const struct addrinfo* rp)
// Convert the address from string format to a sockaddr that can be
// used in bind()
struct
addrinfo
*
result
;
struct
addrinfo
hints
;
struct
addrinfo
hints
{}
;
memset
(
&
hints
,
0
,
sizeof
(
hints
));
hints
.
ai_flags
=
AI_NUMERICHOST
;
hints
.
ai_family
=
AF_UNSPEC
;
...
...
@@ -161,14 +161,14 @@ void TCPClientSocketHandler::connect(const std::string& address, const std::stri
this
->
local_port
=
static_cast
<
uint16_t
>
(
-
1
);
if
(
rp
->
ai_family
==
AF_INET6
)
{
struct
sockaddr_in6
a
;
struct
sockaddr_in6
a
{}
;
socklen_t
l
=
sizeof
(
a
);
if
(
::
getsockname
(
this
->
socket
,
(
struct
sockaddr
*
)
&
a
,
&
l
)
!=
-
1
)
this
->
local_port
=
ntohs
(
a
.
sin6_port
);
}
else
if
(
rp
->
ai_family
==
AF_INET
)
{
struct
sockaddr_in
a
;
struct
sockaddr_in
a
{}
;
socklen_t
l
=
sizeof
(
a
);
if
(
::
getsockname
(
this
->
socket
,
(
struct
sockaddr
*
)
&
a
,
&
l
)
!=
-
1
)
this
->
local_port
=
ntohs
(
a
.
sin_port
);
...
...
src/utils/system.cpp
View file @
8a912ea3
...
...
@@ -9,7 +9,7 @@ namespace utils
{
std
::
string
get_system_name
()
{
struct
utsname
uts
;
struct
utsname
uts
{}
;
const
int
res
=
::
uname
(
&
uts
);
if
(
res
==
-
1
)
{
...
...
src/xmpp/xmpp_parser.hpp
View file @
8a912ea3
...
...
@@ -106,7 +106,7 @@ private:
/**
* Expat structure.
*/
XML_Parser
parser
;
XML_Parser
parser
{}
;
/**
* The current depth in the XML document
*/
...
...
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