mirror of
https://github.com/postgres/postgres.git
synced 2025-12-24 06:01:07 +03:00
Add more missing 'do { ... } while (0)' in missing macros. Without it,
these macros fail in if/else cases:
#define X \
{ \
... \
}
{
if (...)
X;
else
...
}
with proper setup:
#define X \
do { \
... \
} while (0)
it works fine.
This commit is contained in:
@@ -359,13 +359,13 @@ static unsigned char BF_atoi64[0x60] = {
|
||||
};
|
||||
|
||||
#define BF_safe_atoi64(dst, src) \
|
||||
{ \
|
||||
do { \
|
||||
tmp = (unsigned char)(src); \
|
||||
if ((unsigned int)(tmp -= 0x20) >= 0x60) return -1; \
|
||||
tmp = BF_atoi64[tmp]; \
|
||||
if (tmp > 63) return -1; \
|
||||
(dst) = tmp; \
|
||||
}
|
||||
} while (0)
|
||||
|
||||
static int BF_decode(BF_word *dst, const char *src, int size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user