diff options
| author | Bruce Momjian <bruce@momjian.us> | 2001-10-25 00:55:48 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2001-10-25 00:55:48 +0000 |
| commit | b4a57b06486df001e9b4e4350c493e2c15e76380 (patch) | |
| tree | c439b48db1ed46f7c88775d95a3d90428cbd9fee /contrib/pgcrypto/crypt-blowfish.c | |
| parent | 309a04f5b8e77f82b6ce703ff15fcb89368b067c (diff) | |
| download | postgresql-b4a57b06486df001e9b4e4350c493e2c15e76380.tar.gz | |
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.
Diffstat (limited to 'contrib/pgcrypto/crypt-blowfish.c')
| -rw-r--r-- | contrib/pgcrypto/crypt-blowfish.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pgcrypto/crypt-blowfish.c b/contrib/pgcrypto/crypt-blowfish.c index 1a9dba7dff..d60807f241 100644 --- a/contrib/pgcrypto/crypt-blowfish.c +++ b/contrib/pgcrypto/crypt-blowfish.c @@ -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) { |
