1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 09:29:52 +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

@ -2693,7 +2693,7 @@ BLOCK *NewBlock(void *data, UINT size, int compress)
if (compress == 0)
{
// Uncompressed
b->Compressed = FALSE;
b->Compressed = false;
b->Buf = data;
b->Size = size;
b->SizeofData = size;
@ -2703,7 +2703,7 @@ BLOCK *NewBlock(void *data, UINT size, int compress)
UINT max_size;
// Compressed
b->Compressed = TRUE;
b->Compressed = true;
max_size = CalcCompress(size);
b->Buf = MallocFast(max_size);
b->Size = Compress(b->Buf, max_size, data, size);
@ -2717,7 +2717,7 @@ BLOCK *NewBlock(void *data, UINT size, int compress)
// Expand
UINT max_size;
b->Compressed = FALSE;
b->Compressed = false;
max_size = MAX_PACKET_SIZE;
b->Buf = MallocFast(max_size);
b->Size = Uncompress(b->Buf, max_size, data, size);

View File

@ -1780,7 +1780,7 @@ void ProcL2TPPacketRecv(L2TP_SERVER *l2tp, UDPPACKET *p)
Insert(t->RecvQueue, q);
// Read to the end of completed part from the head of the queue
while (TRUE)
while (true)
{
L2TP_QUEUE *q;
if (LIST_NUM(t->RecvQueue) == 0)

View File

@ -1972,10 +1972,10 @@ RECV_RETRY:
if (recv_size == 0)
{
Debug("Radius recv_size 0\n");
finish[pos] = TRUE;
for(i = 0; i < LIST_NUM(ip_list); i++)
finish[pos] = true;
for (i = 0; i < LIST_NUM(ip_list); ++i)
{
if(finish[i] == FALSE)
if (finish[i] == false)
{
// Switch the host to refer
pos++;

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)
{