Skip to content

Commit

Permalink
Merge pull request #175 from nasa/142-reserved-identifier-violation
Browse files Browse the repository at this point in the history
Review and normalized all file header include guards
  • Loading branch information
dccutrig authored Jun 22, 2023
2 parents 454eff7 + b5aa96f commit 433beeb
Show file tree
Hide file tree
Showing 28 changed files with 50 additions and 49 deletions.
6 changes: 3 additions & 3 deletions include/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
[email protected]
*/

#ifndef _crypto_h_
#define _crypto_h_
#ifndef CRYPTO_H
#define CRYPTO_H

/*
** Crypto Includes
Expand Down Expand Up @@ -217,4 +217,4 @@ extern uint8_t badFECF;
extern uint32_t crc32Table[256];
extern uint16_t crc16Table[256];

#endif // _crypto_h_z
#endif //CRYPTO_H
7 changes: 4 additions & 3 deletions include/crypto_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
NASA IV&V
[email protected]
*/
#ifndef _crypto_config_h_
#define _crypto_config_h_
#ifndef CRYPTO_CONFIG_H
#define CRYPTO_CONFIG_H

// Build Defines
//#define BUILD_STATIC
Expand Down Expand Up @@ -186,4 +186,5 @@
// Logic Behavior Defines
#define CRYPTO_FALSE 0
#define CRYPTO_TRUE 1
#endif

#endif //CRYPTO_CONFIG_H
7 changes: 3 additions & 4 deletions include/crypto_config_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ITC Team
NASA IV&V
[email protected]
*/
#ifndef _crypto_config_structs_h_
#define _crypto_config_structs_h_
#ifndef CRYPTO_CONFIG_STRUCTS_H
#define CRYPTO_CONFIG_STRUCTS_H

#include "crypto_config.h"

Expand Down Expand Up @@ -246,5 +246,4 @@ typedef struct
} CamConfig_t;
#define CAM_CONFIG_SIZE (sizeof(CamConfig_t))


#endif
#endif //CRYPTO_CONFIG_STRUCTS_H
6 changes: 3 additions & 3 deletions include/crypto_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
NASA IV&V
[email protected]
*/
#ifndef _crypto_error_h_
#define _crypto_error_h_
#ifndef CRYPTO_ERROR_H
#define CRYPTO_ERROR_H

/*
* If error codes are added to this header file, their enum string must be added to the error lists (in crypto_error.c)
Expand Down Expand Up @@ -129,4 +129,4 @@ extern char *crypto_enum_errlist_crypto_cam[];
#define CRYPTO_UNDEFINED_ERROR "CRYPTO_UNDEFINED_ERROR_CODE"


#endif //_crypto_error_h_
#endif //CRYPTO_ERROR_H
6 changes: 3 additions & 3 deletions include/crypto_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
NASA IV&V
[email protected]
*/
#ifndef _crypto_events_h_
#define _crypto_events_h_
#ifndef CRYPTO_EVENTS_H
#define CRYPTO_EVENTS_H

#define FECF_ERR_EID 0
#define MKID_INVALID_EID 1
Expand All @@ -29,4 +29,4 @@

#define STARTUP 10

#endif
#endif //CRYPTO_EVENTS_H
7 changes: 4 additions & 3 deletions include/crypto_print.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
[email protected]
*/

#ifndef _crypto_print_h_
#define _crypto_print_h_
#ifndef CRYPTO_PRINT_H
#define CRYPTO_PRINT_H

/*
** Includes
Expand All @@ -37,4 +37,5 @@ void Crypto_saPrint(SecurityAssociation_t* sa);
void Crypto_hexprint(const void* c, size_t n);
void Crypto_binprint(void* c, size_t n);
void Crypto_mpPrint(GvcidManagedParameters_t* managed_parameters, uint8_t print_children);
#endif

#endif //CRYPTO_PRINT_H
6 changes: 3 additions & 3 deletions include/crypto_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
[email protected]
*/

#ifndef _crypto_structs_h_
#define _crypto_structs_h_
#ifndef CRYPTO_STRUCTS_H
#define CRYPTO_STRUCTS_H

#include "crypto_config.h"

Expand Down Expand Up @@ -403,4 +403,4 @@ typedef struct
#define TM_MIN_SIZE \
(TM_FRAME_PRIMARYHEADER_SIZE + TM_FRAME_SECHEADER_SIZE + TM_FRAME_SECTRAILER_SIZE + TM_FRAME_CLCW_SIZE)

#endif
#endif //CRYPTO_STRUCTS_H
2 changes: 1 addition & 1 deletion include/cryptography_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ typedef struct
CryptographyInterface get_cryptography_interface_libgcrypt(void);
CryptographyInterface get_cryptography_interface_kmc_crypto_service(void);

#endif // CRYPTOLIB_CRYPTOGRAPHY_INTERFACE_H
#endif //CRYPTOLIB_CRYPTOGRAPHY_INTERFACE_H
6 changes: 3 additions & 3 deletions include/key_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
NASA IV&V
[email protected]
*/
#ifndef _key_interface_h_
#define _key_interface_h_
#ifndef KEY_INTERFACE_H
#define KEY_INTERFACE_H

#include "crypto_error.h"
#include "crypto_structs.h"
Expand Down Expand Up @@ -46,4 +46,4 @@ KeyInterface get_key_interface_custom(void);
KeyInterface get_key_interface_internal(void);
KeyInterface get_key_interface_kmc(void);

#endif /* _key_interface_h_ */
#endif // KEY_INTERFACE_H
2 changes: 1 addition & 1 deletion include/sadb_routine.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ SadbRoutine get_sadb_routine_mariadb(void);
SadbRoutine get_sadb_routine_inmemory(void);
// SadbRoutine init_parse_sadb_routine(uint8_t* );

#endif // CRYPTOLIB_SADB_ROUTINE_H
#endif //CRYPTOLIB_SADB_ROUTINE_H
6 changes: 3 additions & 3 deletions src/crypto/kmc/base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
* @version 2.1.2
**/

#ifndef _BASE64_H
#define _BASE64_H
#ifndef BASE64_H
#define BASE64_H

#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -60,4 +60,4 @@ int32_t base64Decode(const char_t* input, size_t inputLen, void* output,
}
#endif

#endif
#endif //BASE64_H
6 changes: 3 additions & 3 deletions src/crypto/kmc/base64url.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

// https://www.oryx-embedded.com/doc/base64_8h_source.html

#ifndef _BASE64URL_H
#define _BASE64URL_H
#ifndef BASE64URL_H
#define BASE64URL_H

#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -69,4 +69,4 @@ int32_t base64urlDecode(const char_t* input, size_t inputLen, void* output,
}
#endif

#endif
#endif //BASE64URL_H
2 changes: 1 addition & 1 deletion support/standalone/standalone.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ void crypto_standalone_cleanup(const int signal);
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif /* CRYPTOLIB_STANDALONE_H */
#endif //CRYPTOLIB_STANDALONE_H
2 changes: 1 addition & 1 deletion test/include/apply_security.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_APPLY_SECURITY_H
#endif //CRYPTOLIB_APPLY_SECURITY_H
2 changes: 1 addition & 1 deletion test/include/crypto_sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_CRYPTO_SEQUENCE_H
#endif //CRYPTOLIB_CRYPTO_SEQUENCE_H
2 changes: 1 addition & 1 deletion test/include/et_dt_validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_ET_DT_VALIDATION_H
#endif //CRYPTOLIB_ET_DT_VALIDATION_H
2 changes: 1 addition & 1 deletion test/include/process_security.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_PROCESS_SECURITY_H
#endif //CRYPTOLIB_PROCESS_SECURITY_H
2 changes: 1 addition & 1 deletion test/include/shared_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_SHARED_UTIL_H
#endif //CRYPTOLIB_SHARED_UTIL_H
2 changes: 1 addition & 1 deletion test/include/ut_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_UT_CRYPTO_H
#endif //CRYPTOLIB_UT_CRYPTO_H
2 changes: 1 addition & 1 deletion test/include/ut_crypto_aos.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_UT_CRYPTO_AOS_H
#endif //CRYPTOLIB_UT_CRYPTO_AOS_H
2 changes: 1 addition & 1 deletion test/include/ut_crypto_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_UT_CRYPTO_CONFIG_H
#endif //CRYPTOLIB_UT_CRYPTO_CONFIG_H
2 changes: 1 addition & 1 deletion test/include/ut_crypto_mc.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_UT_CRYPTO_MC_H
#endif //CRYPTOLIB_UT_CRYPTO_MC_H
2 changes: 1 addition & 1 deletion test/include/ut_mariadb.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_UT_MARIA_DB_H
#endif //CRYPTOLIB_UT_MARIA_DB_H
2 changes: 1 addition & 1 deletion test/include/ut_tc_apply.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_UT_TC_APPLY_H
#endif //CRYPTOLIB_UT_TC_APPLY_H
2 changes: 1 addition & 1 deletion test/include/ut_tc_process.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ extern "C"
#endif


#endif // CRYPTOLIB_UT_TC_PROCESS_H
#endif //CRYPTOLIB_UT_TC_PROCESS_H
2 changes: 1 addition & 1 deletion test/include/ut_tm_apply.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_UT_TM_APPLY_H
#endif //CRYPTOLIB_UT_TM_APPLY_H
2 changes: 1 addition & 1 deletion test/include/ut_tm_process.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extern "C"
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif // CRYPTOLIB_UT_TM_PROCESS_H
#endif //CRYPTOLIB_UT_TM_PROCESS_H
2 changes: 1 addition & 1 deletion test/include/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -1153,4 +1153,4 @@ int utest_main(int argc, const char* const argv[]) {
return utest_main(argc, argv); \
}

#endif /* SHEREDOM_UTEST_H_INCLUDED */
#endif //SHEREDOM_UTEST_H_INCLUDED

0 comments on commit 433beeb

Please sign in to comment.