1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-07 08:14:58 +03:00

Remove "BOOL", "TRUE" and "FALSE", use lowercase everywhere for consistency

This commit is contained in:
Davide Beatrici
2020-08-15 03:05:30 +02:00
parent 1c56562cc7
commit 337a04b758
9 changed files with 16 additions and 25 deletions

View File

@ -171,13 +171,6 @@ typedef int PID;
typedef unsigned long PID;
#endif // WINDOWS_H
// bool type
#ifndef WINDOWS_H
typedef unsigned int BOOL;
#define TRUE 1
#define FALSE 0
#endif // WINDOWS_H
// bool type
#ifndef WIN32COM_CPP
typedef unsigned int bool;

View File

@ -23,7 +23,7 @@ bool g_debug; // Debug mode
UINT64 kernel_status[NUM_KERNEL_STATUS]; // Kernel state
UINT64 kernel_status_max[NUM_KERNEL_STATUS]; // Kernel state (maximum value)
LOCK *kernel_status_lock[NUM_KERNEL_STATUS]; // Kernel state lock
BOOL kernel_status_inited = false; // Kernel state initialization flag
bool kernel_status_inited = false; // Kernel state initialization flag
bool g_little_endian = true;
char *cmdline = NULL; // Command line
wchar_t *uni_cmdline = NULL; // Unicode command line

View File

@ -302,7 +302,7 @@ extern bool g_foreground;
extern UINT64 kernel_status[NUM_KERNEL_STATUS];
extern UINT64 kernel_status_max[NUM_KERNEL_STATUS];
extern LOCK *kernel_status_lock[NUM_KERNEL_STATUS];
extern BOOL kernel_status_inited;
extern bool kernel_status_inited;
// Kernel state operation macro
#define KS_LOCK(id) LockKernelStatus(id)

View File

@ -3438,7 +3438,7 @@ int B64_Encode(char *set, char *source, int len)
{
return 0;
}
while (TRUE)
while (true)
{
if (i >= len)
{
@ -3491,7 +3491,7 @@ int B64_Decode(char *set, char *source, int len)
src = source;
i = 0;
j = 0;
while (TRUE)
while (true)
{
f1 = f2 = f3 = f4 = 0;
if (i >= len)

View File

@ -17,7 +17,7 @@
struct LOCK
{
void *pData;
BOOL Ready;
bool Ready;
#ifdef OS_UNIX
UINT thread_id;
UINT locked_count;

View File

@ -2478,7 +2478,6 @@ void TrimRight(char *str)
{
char *buf, *tmp;
UINT len, i, wp, wp2;
BOOL flag;
// Validate arguments
if (str == NULL)
{
@ -2496,10 +2495,9 @@ void TrimRight(char *str)
buf = Malloc(len + 1);
tmp = Malloc(len + 1);
flag = FALSE;
wp = 0;
wp2 = 0;
for (i = 0;i < len;i++)
for (i = 0; i < len; ++i)
{
if (str[i] != ' ' && str[i] != '\t')
{
@ -2524,7 +2522,7 @@ void TrimLeft(char *str)
{
char *buf;
UINT len, i, wp;
BOOL flag;
bool flag;
// Validate arguments
if (str == NULL)
{
@ -2541,13 +2539,13 @@ void TrimLeft(char *str)
}
buf = Malloc(len + 1);
flag = FALSE;
flag = false;
wp = 0;
for (i = 0;i < len;i++)
{
if (str[i] != ' ' && str[i] != '\t')
{
flag = TRUE;
flag = true;
}
if (flag)
{