diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-01-28 21:30:39 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-01-30 23:35:50 +0000 |
commit | 92ffad1a72bc8c422426d52ac408bd71242dd047 (patch) | |
tree | f592f353068dd2043525dd2cc04d6124a4ed4bc4 /toxav/rtp.c | |
parent | 623e9ac331df7323660e21c8a2226523a5ee713b (diff) |
Use nullptr as NULL pointer constant instead of NULL or 0.
This changes only code, no string literals or comments.
Diffstat (limited to 'toxav/rtp.c')
-rw-r--r-- | toxav/rtp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/toxav/rtp.c b/toxav/rtp.c index 1e07516c..01d4258a 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c | |||
@@ -49,7 +49,7 @@ RTPSession *rtp_new(int payload_type, Messenger *m, uint32_t friendnumber, | |||
49 | 49 | ||
50 | if (!retu) { | 50 | if (!retu) { |
51 | LOGGER_WARNING(m->log, "Alloc failed! Program might misbehave!"); | 51 | LOGGER_WARNING(m->log, "Alloc failed! Program might misbehave!"); |
52 | return NULL; | 52 | return nullptr; |
53 | } | 53 | } |
54 | 54 | ||
55 | retu->ssrc = random_u32(); | 55 | retu->ssrc = random_u32(); |
@@ -67,7 +67,7 @@ RTPSession *rtp_new(int payload_type, Messenger *m, uint32_t friendnumber, | |||
67 | if (-1 == rtp_allow_receiving(retu)) { | 67 | if (-1 == rtp_allow_receiving(retu)) { |
68 | LOGGER_WARNING(m->log, "Failed to start rtp receiving mode"); | 68 | LOGGER_WARNING(m->log, "Failed to start rtp receiving mode"); |
69 | free(retu); | 69 | free(retu); |
70 | return NULL; | 70 | return nullptr; |
71 | } | 71 | } |
72 | 72 | ||
73 | return retu; | 73 | return retu; |
@@ -85,7 +85,7 @@ void rtp_kill(RTPSession *session) | |||
85 | } | 85 | } |
86 | int rtp_allow_receiving(RTPSession *session) | 86 | int rtp_allow_receiving(RTPSession *session) |
87 | { | 87 | { |
88 | if (session == NULL) { | 88 | if (session == nullptr) { |
89 | return -1; | 89 | return -1; |
90 | } | 90 | } |
91 | 91 | ||
@@ -100,11 +100,11 @@ int rtp_allow_receiving(RTPSession *session) | |||
100 | } | 100 | } |
101 | int rtp_stop_receiving(RTPSession *session) | 101 | int rtp_stop_receiving(RTPSession *session) |
102 | { | 102 | { |
103 | if (session == NULL) { | 103 | if (session == nullptr) { |
104 | return -1; | 104 | return -1; |
105 | } | 105 | } |
106 | 106 | ||
107 | m_callback_rtp_packet(session->m, session->friend_number, session->payload_type, NULL, NULL); | 107 | m_callback_rtp_packet(session->m, session->friend_number, session->payload_type, nullptr, nullptr); |
108 | 108 | ||
109 | LOGGER_DEBUG(session->m->log, "Stopped receiving on session: %p", session); | 109 | LOGGER_DEBUG(session->m->log, "Stopped receiving on session: %p", session); |
110 | return 0; | 110 | return 0; |
@@ -286,7 +286,7 @@ int handle_rtp_packet(Messenger *m, uint32_t friendnumber, const uint8_t *data, | |||
286 | free(session->mp); | 286 | free(session->mp); |
287 | } | 287 | } |
288 | 288 | ||
289 | session->mp = NULL; | 289 | session->mp = nullptr; |
290 | } | 290 | } |
291 | 291 | ||
292 | /* The message came in the allowed time; | 292 | /* The message came in the allowed time; |
@@ -341,7 +341,7 @@ int handle_rtp_packet(Messenger *m, uint32_t friendnumber, const uint8_t *data, | |||
341 | free(session->mp); | 341 | free(session->mp); |
342 | } | 342 | } |
343 | 343 | ||
344 | session->mp = NULL; | 344 | session->mp = nullptr; |
345 | } | 345 | } |
346 | } else { | 346 | } else { |
347 | /* Second case */ | 347 | /* Second case */ |
@@ -368,7 +368,7 @@ int handle_rtp_packet(Messenger *m, uint32_t friendnumber, const uint8_t *data, | |||
368 | free(session->mp); | 368 | free(session->mp); |
369 | } | 369 | } |
370 | 370 | ||
371 | session->mp = NULL; | 371 | session->mp = nullptr; |
372 | goto NEW_MULTIPARTED; | 372 | goto NEW_MULTIPARTED; |
373 | } | 373 | } |
374 | } else { | 374 | } else { |