gpu: nvgpu: posix: use MISRA-friendly true/false

In stdbool.h, gcc defines true and false as 1 and 0, respectively. Using
these as booleans generates MISRA 14.4 violations. So, define them as
real booleans in the POSIX types.h.

JIRA NVGPU-1022

Change-Id: Ic00e6ffb885c8d60ed40ca10ca5d686b4c2d39eb
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1975425
Reviewed-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Scott Long <scottl@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2018-12-18 10:00:52 -05:00
committed by mobile promotions
parent 90024cb73a
commit 6db2be854c

View File

@@ -38,6 +38,16 @@
*/
#include <netinet/in.h>
#ifdef false
#undef false
#endif
#define false (0 != 0)
#ifdef true
#undef true
#endif
#define true (0 == 0)
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;