Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
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
nghttp2
Commits
bd3cc94a
Commit
bd3cc94a
authored
Feb 10, 2022
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use nullptr for C++ code
parent
02f2336a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
16 deletions
+17
-16
src/h2load.cc
src/h2load.cc
+1
-1
src/h2load_http3_session.cc
src/h2load_http3_session.cc
+4
-3
src/inflatehd.cc
src/inflatehd.cc
+1
-1
src/nghttpd.cc
src/nghttpd.cc
+2
-2
src/shrpx-unittest.cc
src/shrpx-unittest.cc
+2
-2
src/shrpx_http2_session.cc
src/shrpx_http2_session.cc
+1
-1
src/shrpx_log.cc
src/shrpx_log.cc
+1
-1
src/shrpx_log_config.cc
src/shrpx_log_config.cc
+1
-1
src/util.cc
src/util.cc
+1
-1
src/util_test.cc
src/util_test.cc
+3
-3
No files found.
src/h2load.cc
View file @
bd3cc94a
...
...
@@ -1589,7 +1589,7 @@ void Worker::free_client(Client *deleted_client) {
client
->
req_todo
=
client
->
req_done
;
stats
.
req_todo
+=
client
->
req_todo
;
auto
index
=
&
client
-
&
clients
[
0
];
clients
[
index
]
=
NULL
;
clients
[
index
]
=
nullptr
;
return
;
}
}
...
...
src/h2load_http3_session.cc
View file @
bd3cc94a
...
...
@@ -319,7 +319,8 @@ int Http3Session::init_conn() {
int64_t
ctrl_stream_id
;
rv
=
ngtcp2_conn_open_uni_stream
(
client_
->
quic
.
conn
,
&
ctrl_stream_id
,
NULL
);
rv
=
ngtcp2_conn_open_uni_stream
(
client_
->
quic
.
conn
,
&
ctrl_stream_id
,
nullptr
);
if
(
rv
!=
0
)
{
std
::
cerr
<<
"ngtcp2_conn_open_uni_stream: "
<<
ngtcp2_strerror
(
rv
)
<<
std
::
endl
;
...
...
@@ -336,7 +337,7 @@ int Http3Session::init_conn() {
int64_t
qpack_enc_stream_id
,
qpack_dec_stream_id
;
rv
=
ngtcp2_conn_open_uni_stream
(
client_
->
quic
.
conn
,
&
qpack_enc_stream_id
,
NULL
);
nullptr
);
if
(
rv
!=
0
)
{
std
::
cerr
<<
"ngtcp2_conn_open_uni_stream: "
<<
ngtcp2_strerror
(
rv
)
<<
std
::
endl
;
...
...
@@ -344,7 +345,7 @@ int Http3Session::init_conn() {
}
rv
=
ngtcp2_conn_open_uni_stream
(
client_
->
quic
.
conn
,
&
qpack_dec_stream_id
,
NULL
);
nullptr
);
if
(
rv
!=
0
)
{
std
::
cerr
<<
"ngtcp2_conn_open_uni_stream: "
<<
ngtcp2_strerror
(
rv
)
<<
std
::
endl
;
...
...
src/inflatehd.cc
View file @
bd3cc94a
...
...
@@ -171,7 +171,7 @@ static int inflate_hd(json_t *obj, nghttp2_hd_inflater *inflater, int seq) {
}
static
int
perform
(
void
)
{
nghttp2_hd_inflater
*
inflater
=
NULL
;
nghttp2_hd_inflater
*
inflater
=
nullptr
;
json_error_t
error
;
auto
json
=
json_loadf
(
stdin
,
0
,
&
error
);
...
...
src/nghttpd.cc
View file @
bd3cc94a
...
...
@@ -55,7 +55,7 @@ namespace nghttp2 {
namespace
{
int
parse_push_config
(
Config
&
config
,
const
char
*
optarg
)
{
const
char
*
eq
=
strchr
(
optarg
,
'='
);
if
(
eq
==
NULL
)
{
if
(
eq
==
nullptr
)
{
return
-
1
;
}
auto
&
paths
=
config
.
push
[
std
::
string
(
optarg
,
eq
)];
...
...
@@ -63,7 +63,7 @@ int parse_push_config(Config &config, const char *optarg) {
auto
i
=
eq
+
1
;
for
(;;)
{
const
char
*
j
=
strchr
(
i
,
','
);
if
(
j
==
NULL
)
{
if
(
j
==
nullptr
)
{
j
=
optarg_end
;
}
paths
.
emplace_back
(
i
,
j
);
...
...
src/shrpx-unittest.cc
View file @
bd3cc94a
...
...
@@ -52,7 +52,7 @@ static int init_suite1(void) { return 0; }
static
int
clean_suite1
(
void
)
{
return
0
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
CU_pSuite
pSuite
=
NULL
;
CU_pSuite
pSuite
=
nullptr
;
unsigned
int
num_tests_failed
;
nghttp2
::
tls
::
libssl_init
();
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
// add a suite to the registry
pSuite
=
CU_add_suite
(
"shrpx_TestSuite"
,
init_suite1
,
clean_suite1
);
if
(
NULL
==
pSuite
)
{
if
(
nullptr
==
pSuite
)
{
CU_cleanup_registry
();
return
CU_get_error
();
}
...
...
src/shrpx_http2_session.cc
View file @
bd3cc94a
...
...
@@ -1875,7 +1875,7 @@ void Http2Session::start_checking_connection() {
SSLOG
(
INFO
,
this
)
<<
"Start checking connection"
;
// If connection is down, we may get error when writing data. Issue
// ping frame to see whether connection is alive.
nghttp2_submit_ping
(
session_
,
NGHTTP2_FLAG_NONE
,
NULL
);
nghttp2_submit_ping
(
session_
,
NGHTTP2_FLAG_NONE
,
nullptr
);
// set ping timeout and start timer again
reset_connection_check_timer
(
CONNCHK_PING_TIMEOUT
);
...
...
src/shrpx_log.cc
View file @
bd3cc94a
...
...
@@ -90,7 +90,7 @@ pthread_once_t lckey_once = PTHREAD_ONCE_INIT;
}
// namespace
namespace
{
void
make_key
()
{
pthread_key_create
(
&
lckey
,
NULL
);
}
void
make_key
()
{
pthread_key_create
(
&
lckey
,
nullptr
);
}
}
// namespace
LogBuffer
*
get_logbuf
()
{
...
...
src/shrpx_log_config.cc
View file @
bd3cc94a
...
...
@@ -71,7 +71,7 @@ pthread_once_t lckey_once = PTHREAD_ONCE_INIT;
}
// namespace
namespace
{
void
make_key
()
{
pthread_key_create
(
&
lckey
,
NULL
);
}
void
make_key
()
{
pthread_key_create
(
&
lckey
,
nullptr
);
}
}
// namespace
LogConfig
*
log_config
()
{
...
...
src/util.cc
View file @
bd3cc94a
...
...
@@ -90,7 +90,7 @@ int nghttp2_inet_pton(int af, const char *src, void *dst) {
int
size
=
sizeof
(
struct
in6_addr
);
if
(
WSAStringToAddress
(
addr
,
af
,
NULL
,
(
LPSOCKADDR
)
dst
,
&
size
)
==
0
)
if
(
WSAStringToAddress
(
addr
,
af
,
nullptr
,
(
LPSOCKADDR
)
dst
,
&
size
)
==
0
)
return
1
;
return
0
;
# endif
...
...
src/util_test.cc
View file @
bd3cc94a
...
...
@@ -207,7 +207,7 @@ void test_util_http_date(void) {
}
void
test_util_select_h2
(
void
)
{
const
unsigned
char
*
out
=
NULL
;
const
unsigned
char
*
out
=
nullptr
;
unsigned
char
outlen
=
0
;
// Check single entry and select it.
...
...
@@ -217,7 +217,7 @@ void test_util_select_h2(void) {
memcmp
(
NGHTTP2_PROTO_VERSION_ID
,
out
,
NGHTTP2_PROTO_VERSION_ID_LEN
)
==
0
);
CU_ASSERT
(
NGHTTP2_PROTO_VERSION_ID_LEN
==
outlen
);
out
=
NULL
;
out
=
nullptr
;
outlen
=
0
;
// Check the case where id is correct but length is invalid and too
...
...
@@ -233,7 +233,7 @@ void test_util_select_h2(void) {
memcmp
(
NGHTTP2_PROTO_VERSION_ID
,
out
,
NGHTTP2_PROTO_VERSION_ID_LEN
)
==
0
);
CU_ASSERT
(
NGHTTP2_PROTO_VERSION_ID_LEN
==
outlen
);
out
=
NULL
;
out
=
nullptr
;
outlen
=
0
;
// Check the case that last entry's length is invalid and too long.
...
...
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