Skip to content

Commit 0385315

Browse files
committed
Make struct typedefs have the same name as their struct
1 parent e848853 commit 0385315

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

toxav/audio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#define AUDIO_MAX_BUFFER_SIZE_PCM16 ((AUDIO_MAX_SAMPLE_RATE * AUDIO_MAX_FRAME_DURATION_MS) / 1000)
3535
#define AUDIO_MAX_BUFFER_SIZE_BYTES (AUDIO_MAX_BUFFER_SIZE_PCM16 * 2)
3636

37-
typedef struct ACSession_s {
37+
typedef struct ACSession {
3838
Mono_Time *mono_time;
3939
const Logger *log;
4040

toxav/bwcontroller.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ typedef struct BWCRcvPkt {
3434
RingBuffer *rb;
3535
} BWCRcvPkt;
3636

37-
struct BWController_s {
37+
struct BWController {
3838
m_cb *mcb;
3939
void *mcb_user_data;
4040

@@ -62,7 +62,7 @@ static void send_update(BWController *bwc);
6262
BWController *bwc_new(Messenger *m, Tox *tox, uint32_t friendnumber, m_cb *mcb, void *mcb_user_data,
6363
Mono_Time *bwc_mono_time)
6464
{
65-
BWController *retu = (BWController *)calloc(sizeof(struct BWController_s), 1);
65+
BWController *retu = (BWController *)calloc(sizeof(BWController), 1);
6666

6767
if (retu == nullptr) {
6868
return nullptr;

toxav/bwcontroller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "../toxcore/Messenger.h"
99
#include "../toxcore/tox.h"
1010

11-
typedef struct BWController_s BWController;
11+
typedef struct BWController BWController;
1212

1313
typedef void m_cb(BWController *bwc, uint32_t friend_number, float todo, void *user_data);
1414

toxav/msi.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ typedef enum MSICallbackID {
6464
/**
6565
* The call struct. Please do not modify outside msi.c
6666
*/
67-
typedef struct MSICall_s {
68-
struct MSISession_s *session; /* Session pointer */
67+
typedef struct MSICall {
68+
struct MSISession *session; /* Session pointer */
6969

7070
MSICallState state;
7171
uint8_t peer_capabilities; /* Peer capabilities */
@@ -74,10 +74,10 @@ typedef struct MSICall_s {
7474
uint32_t friend_number; /* Index of this call in MSISession */
7575
MSIError error; /* Last error */
7676

77-
struct ToxAVCall_s *av_call; /* Pointer to av call handler */
77+
struct ToxAVCall *av_call; /* Pointer to av call handler */
7878

79-
struct MSICall_s *next;
80-
struct MSICall_s *prev;
79+
struct MSICall *next;
80+
struct MSICall *prev;
8181
} MSICall;
8282

8383

@@ -91,7 +91,7 @@ typedef int msi_action_cb(void *av, MSICall *call);
9191
/**
9292
* Control session struct. Please do not modify outside msi.c
9393
*/
94-
typedef struct MSISession_s {
94+
typedef struct MSISession {
9595
/* Call handlers */
9696
MSICall **calls;
9797
uint32_t calls_tail;

toxav/toxav.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
// iteration interval that is used when no call is active
3535
#define IDLE_ITERATION_INTERVAL_MS 200
3636

37-
typedef struct ToxAVCall_s {
37+
typedef struct ToxAVCall {
3838
ToxAV *av;
3939

4040
pthread_mutex_t mutex_audio[1];
@@ -59,13 +59,13 @@ typedef struct ToxAVCall_s {
5959

6060
pthread_mutex_t toxav_call_mutex[1];
6161

62-
struct ToxAVCall_s *prev;
63-
struct ToxAVCall_s *next;
62+
struct ToxAVCall *prev;
63+
struct ToxAVCall *next;
6464
} ToxAVCall;
6565

6666

6767
/** Decode time statistics */
68-
typedef struct DecodeTimeStats_s {
68+
typedef struct DecodeTimeStats {
6969
/** Measure count */
7070
int32_t count;
7171
/** Last cycle total */

toxav/video.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#include <pthread.h>
2424

25-
typedef struct VCSession_s {
25+
typedef struct VCSession {
2626
/* encoding */
2727
vpx_codec_ctx_t encoder[1];
2828
uint32_t frame_counter;

0 commit comments

Comments
 (0)