mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-30 05:39:12 +02:00
Add missing spaces between while keyword and condition.
Our convention is to have a space here but some were missed.
This commit is contained in:
parent
28ab65df10
commit
1d45282b97
@ -205,28 +205,28 @@ Throw an error when a system call fails
|
||||
{ \
|
||||
bool error = expression; \
|
||||
errorInternalThrowOnSys(error, errno, &errorType, __FILE__, __func__, __LINE__, message); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define THROW_ON_SYS_ERROR_FMT(expression, errorType, ...) \
|
||||
do \
|
||||
{ \
|
||||
bool error = expression; \
|
||||
errorInternalThrowOnSysFmt(error, errno, &errorType, __FILE__, __func__, __LINE__, __VA_ARGS__); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define THROWP_ON_SYS_ERROR(expression, errorType, message) \
|
||||
do \
|
||||
{ \
|
||||
bool error = expression; \
|
||||
errorInternalThrowOnSys(error, errno, errorType, __FILE__, __func__, __LINE__, message); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define THROWP_ON_SYS_ERROR_FMT(expression, errorType, ...) \
|
||||
do \
|
||||
{ \
|
||||
bool error = expression; \
|
||||
errorInternalThrowOnSysFmt(error, errno, errorType, __FILE__, __func__, __LINE__, __VA_ARGS__); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
// Else define the normal macros which check for an error first
|
||||
#else
|
||||
@ -235,28 +235,28 @@ Throw an error when a system call fails
|
||||
{ \
|
||||
if (expression) \
|
||||
errorInternalThrowSys(errno, &errorType, __FILE__, __func__, __LINE__, message); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define THROW_ON_SYS_ERROR_FMT(expression, errorType, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (expression) \
|
||||
errorInternalThrowSysFmt(errno, &errorType, __FILE__, __func__, __LINE__, __VA_ARGS__); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define THROWP_ON_SYS_ERROR(expression, errorType, message) \
|
||||
do \
|
||||
{ \
|
||||
if (expression) \
|
||||
errorInternalThrowSys(errno, errorType, __FILE__, __func__, __LINE__, message); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define THROWP_ON_SYS_ERROR_FMT(expression, errorType, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (expression) \
|
||||
errorInternalThrowSysFmt(errno, errorType, __FILE__, __func__, __LINE__, __VA_ARGS__); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -52,7 +52,7 @@ Adapted from PostgreSQL src/include/c.h.
|
||||
***********************************************************************************************************************************/
|
||||
#ifdef HAVE_STATIC_ASSERT
|
||||
#define STATIC_ASSERT_STMT(condition, message) \
|
||||
do {_Static_assert(condition, message);} while(0)
|
||||
do {_Static_assert(condition, message);} while (0)
|
||||
|
||||
#define STATIC_ASSERT_EXPR(condition, message) \
|
||||
((void)({STATIC_ASSERT_STMT(condition, message); true;}))
|
||||
|
@ -75,7 +75,7 @@ MEM_CONTEXT_END();
|
||||
/* Switch back to the prior context */ \
|
||||
memContextSwitchBack(); \
|
||||
} \
|
||||
while(0)
|
||||
while (0)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Switch to prior context and ensure that the previous prior memory context is restored after the block executes (even on error)
|
||||
@ -126,7 +126,7 @@ Note that memory context names are expected to live for the lifetime of the cont
|
||||
memContextSwitchBack(); \
|
||||
memContextKeep(); \
|
||||
} \
|
||||
while(0)
|
||||
while (0)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Create a temporary memory context and make sure it is freed when done (even on error)
|
||||
|
@ -48,7 +48,7 @@ Maximum size of a string
|
||||
if ((size) > STRING_SIZE_MAX) \
|
||||
THROW(AssertError, "string size must be <= " STRINGIFY(STRING_SIZE_MAX) " bytes"); \
|
||||
} \
|
||||
while(0)
|
||||
while (0)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Object type
|
||||
|
@ -117,7 +117,7 @@ strLstNewSplitZ(const String *string, const char *delimiter)
|
||||
else
|
||||
strLstAddInternal(this, strNew(stringBase));
|
||||
}
|
||||
while(stringMatch != NULL);
|
||||
while (stringMatch != NULL);
|
||||
}
|
||||
MEM_CONTEXT_END();
|
||||
|
||||
@ -196,7 +196,7 @@ strLstNewSplitSizeZ(const String *string, const char *delimiter, size_t size)
|
||||
strLstAddInternal(this, strNew(stringBase));
|
||||
}
|
||||
}
|
||||
while(stringMatch != NULL);
|
||||
while (stringMatch != NULL);
|
||||
}
|
||||
MEM_CONTEXT_END();
|
||||
|
||||
|
@ -247,7 +247,7 @@ cfgDefDataFind(
|
||||
|
||||
offset += size + 1;
|
||||
}
|
||||
while(type != configDefDataTypeEnd);
|
||||
while (type != configDefDataTypeEnd);
|
||||
}
|
||||
|
||||
FUNCTION_TEST_RETURN_VOID();
|
||||
|
@ -141,7 +141,7 @@ sub endRetry
|
||||
);
|
||||
|
||||
# Drain the output and error streams and look for test points
|
||||
while(waitpid($self->{pId}, WNOHANG) == 0)
|
||||
while (waitpid($self->{pId}, WNOHANG) == 0)
|
||||
{
|
||||
my $bFound = false;
|
||||
|
||||
|
@ -283,7 +283,7 @@ Test system calls
|
||||
AssertError, "SYSTEM COMMAND: %s\n\nFAILED WITH CODE %d\n\nTHROWN AT:\n%s", hrnReplaceKey(command), \
|
||||
TEST_SYSTEM_FMT_result, errorStackTrace()); \
|
||||
} \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define TEST_SYSTEM_FMT(...) \
|
||||
do \
|
||||
@ -294,7 +294,7 @@ Test system calls
|
||||
THROW_FMT(AssertError, "command needs more than the %zu characters available", sizeof(TEST_SYSTEM_FMT_buffer)); \
|
||||
\
|
||||
TEST_SYSTEM(TEST_SYSTEM_FMT_buffer); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Test log result
|
||||
@ -311,7 +311,7 @@ Test log result
|
||||
THROW_FMT(AssertError, "LOG RESULT FAILED WITH:\n%s", errorMessage()); \
|
||||
} \
|
||||
TRY_END(); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define TEST_RESULT_LOG_FMT(...) \
|
||||
do \
|
||||
@ -326,7 +326,7 @@ Test log result
|
||||
} \
|
||||
\
|
||||
TEST_RESULT_LOG(TEST_RESULT_LOG_FMT_buffer); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Logging macros
|
||||
@ -337,7 +337,7 @@ Logging macros
|
||||
hrnTestLogPrefix(__LINE__, true); \
|
||||
printf("%s\n", message); \
|
||||
fflush(stdout); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define TEST_LOG_FMT(format, ...) \
|
||||
do \
|
||||
@ -345,7 +345,7 @@ Logging macros
|
||||
hrnTestLogPrefix(__LINE__, true); \
|
||||
printf(format "\n", __VA_ARGS__); \
|
||||
fflush(stdout); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Test title macro
|
||||
@ -356,7 +356,7 @@ Test title macro
|
||||
hrnTestLogPrefix(__LINE__, false); \
|
||||
printf("%s\n", message); \
|
||||
fflush(stdout); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define TEST_TITLE_FMT(format, ...) \
|
||||
do \
|
||||
@ -364,7 +364,7 @@ Test title macro
|
||||
hrnTestLogPrefix(__LINE__, false); \
|
||||
printf(format "\n", __VA_ARGS__); \
|
||||
fflush(stdout); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Is this a 64-bit system? If not then it is 32-bit since 16-bit systems are not supported.
|
||||
|
Loading…
x
Reference in New Issue
Block a user