Skip to content

Commit 753586b

Browse files
nayaknedSebastianSchildt
authored andcommitted
Removed stdint.h inclusion. Using the inclusion from avtp/Defines.h
Signed-off-by: Naresh Nayak <[email protected]>
1 parent 90db742 commit 753586b

File tree

10 files changed

+16
-34
lines changed

10 files changed

+16
-34
lines changed

include/avtp/Defines.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* * Redistributions in binary form must reproduce the above copyright
1010
* notice, this list of conditions and the following disclaimer in the
1111
* documentation and/or other materials provided with the distribution.
12-
* * Neither the name of COVESA nor the names of its contributors may be
12+
* * Neither the name of COVESA nor the names of its contributors may be
1313
* used to endorse or promote products derived from this software without
1414
* specific prior written permission.
1515
*
@@ -29,14 +29,15 @@
2929

3030
#pragma once
3131

32+
#ifdef __cplusplus
33+
extern "C" {
34+
#endif
35+
3236
#ifdef LINUX_KERNEL1722
3337
#include <linux/types.h>
3438
#else
3539
#include <stdint.h>
3640
#endif
37-
#ifdef __cplusplus
38-
extern "C" {
39-
#endif
4041

4142
/**
4243
* Max bits that the parser supports for a single data field within a 1722

include/avtp/acf/Can.h

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
#pragma once
3737

38-
3938
#include "avtp/Defines.h"
4039
#include "avtp/acf/AcfCommon.h"
4140

include/avtp/acf/CanBrief.h

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535

3636
#pragma once
3737

38-
#include <stdint.h>
39-
4038
#include "avtp/Defines.h"
4139
#include "avtp/acf/AcfCommon.h"
4240
#include "avtp/acf/Can.h"

include/avtp/acf/Gpc.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* * Redistributions in binary form must reproduce the above copyright
1010
* notice, this list of conditions and the following disclaimer in the
1111
* documentation and/or other materials provided with the distribution.
12-
* * Neither the name of COVESA nor the names of its contributors may be
12+
* * Neither the name of COVESA nor the names of its contributors may be
1313
* used to endorse or promote products derived from this software without
1414
* specific prior written permission.
1515
*
@@ -34,8 +34,6 @@
3434
*/
3535
#pragma once
3636

37-
#include <stdint.h>
38-
3937
#include "avtp/Defines.h"
4038
#include "avtp/acf/AcfCommon.h"
4139

@@ -58,7 +56,7 @@ typedef enum {
5856
AVTP_GPC_FIELD_ACF_MSG_LENGTH,
5957

6058
/* ACF GPC header fields */
61-
AVTP_GPC_FIELD_GPC_MSG_ID,
59+
AVTP_GPC_FIELD_GPC_MSG_ID,
6260

6361
/* Count number of fields for bound checks */
6462
AVTP_GPC_FIELD_MAX

include/avtp/acf/Lin.h

-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434

3535
#pragma once
3636

37-
#include <stdint.h>
38-
3937
#include "avtp/Defines.h"
4038
#include "avtp/acf/AcfCommon.h"
4139

include/avtp/acf/Most.h

-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434

3535
#pragma once
3636

37-
#include <stdint.h>
38-
3937
#include "avtp/Defines.h"
4038
#include "avtp/acf/AcfCommon.h"
4139

include/avtp/acf/Ntscf.h

-6
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@
3535

3636
#pragma once
3737

38-
#ifdef LINUX_KERNEL1722
39-
#include <linux/types.h>
40-
#else
41-
#include <stdint.h>
42-
#endif
43-
4438
#include "avtp/Defines.h"
4539

4640
#ifdef __cplusplus

include/avtp/acf/Sensor.h

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535

3636
#pragma once
3737

38-
#include <stdint.h>
39-
4038
#include "avtp/Defines.h"
4139
#include "avtp/acf/AcfCommon.h"
4240

include/avtp/acf/SensorBrief.h

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535

3636
#pragma once
3737

38-
#include <stdint.h>
39-
4038
#include "avtp/Defines.h"
4139
#include "avtp/acf/AcfCommon.h"
4240

src/avtp/acf/Gpc.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* * Redistributions in binary form must reproduce the above copyright
1010
* notice, this list of conditions and the following disclaimer in the
1111
* documentation and/or other materials provided with the distribution.
12-
* * Neither the name of COVESA nor the names of its contributors may be
12+
* * Neither the name of COVESA nor the names of its contributors may be
1313
* used to endorse or promote products derived from this software without
1414
* specific prior written permission.
1515
*
@@ -31,7 +31,7 @@
3131
#include <string.h>
3232

3333
#include "avtp/acf/Gpc.h"
34-
#include "avtp/Utils.h"
34+
#include "avtp/Utils.h"
3535
#include "avtp/Defines.h"
3636

3737
#define GET_FIELD(field) \
@@ -46,21 +46,21 @@ static const Avtp_FieldDescriptor_t Avtp_GpcFieldDesc[AVTP_GPC_FIELD_MAX] =
4646
{
4747
/* ACF common header fields */
4848
[AVTP_GPC_FIELD_ACF_MSG_TYPE] = { .quadlet = 0, .offset = 0, .bits = 7 },
49-
[AVTP_GPC_FIELD_ACF_MSG_LENGTH] = { .quadlet = 0, .offset = 7, .bits = 9 },
49+
[AVTP_GPC_FIELD_ACF_MSG_LENGTH] = { .quadlet = 0, .offset = 7, .bits = 9 },
5050
/* ACF GPC header fields */
5151
[AVTP_GPC_FIELD_GPC_MSG_ID] = { .quadlet = 0, .offset = 16, .bits = 48 },
5252
};
5353

5454
void Avtp_Gpc_Init(Avtp_Gpc_t* pdu)
5555
{
5656
if(pdu != NULL) {
57-
memset(pdu, 0, sizeof(Avtp_Gpc_t));
57+
memset(pdu, 0, sizeof(Avtp_Gpc_t));
5858
Avtp_Gpc_SetField(pdu, AVTP_GPC_FIELD_ACF_MSG_TYPE, AVTP_ACF_TYPE_GPC);
5959
}
6060
}
6161

6262
uint64_t Avtp_Gpc_GetField(Avtp_Gpc_t* pdu, Avtp_GpcFields_t field)
63-
{
63+
{
6464
return GET_FIELD(field);
6565
}
6666

@@ -80,22 +80,22 @@ uint64_t Avtp_Gpc_GetGpcMsgId(Avtp_Gpc_t* pdu)
8080
}
8181

8282
void Avtp_Gpc_SetField(Avtp_Gpc_t* pdu, Avtp_GpcFields_t field, uint64_t value)
83-
{
83+
{
8484
SET_FIELD(field, value);
8585
}
8686

8787
void Avtp_Gpc_SetAcfMsgType(Avtp_Gpc_t* pdu, uint8_t value)
88-
{
88+
{
8989
SET_FIELD(AVTP_GPC_FIELD_ACF_MSG_TYPE, value);
9090
}
9191

9292
void Avtp_Gpc_SetAcfMsgLength(Avtp_Gpc_t* pdu, uint16_t value)
93-
{
93+
{
9494
SET_FIELD(AVTP_GPC_FIELD_ACF_MSG_LENGTH, value);
9595
}
9696

9797
void Avtp_Gpc_SetGpcMsgId(Avtp_Gpc_t* pdu, uint64_t value)
98-
{
98+
{
9999
SET_FIELD(AVTP_GPC_FIELD_GPC_MSG_ID, value);
100100
}
101101

0 commit comments

Comments
 (0)