1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Add do { ... } while (0) to more bad macros.

This commit is contained in:
Bruce Momjian
2001-10-25 01:29:37 +00:00
parent b4a57b0648
commit fde8edaf53
13 changed files with 89 additions and 42 deletions

View File

@ -280,9 +280,9 @@ char Lookahead(char * word, int how_far) {
/* phonize one letter */
#define Phonize(c) {(*phoned_word)[p_idx++] = c;}
#define Phonize(c) do {(*phoned_word)[p_idx++] = c;} while (0)
/* Slap a null character on the end of the phoned word */
#define End_Phoned_Word {(*phoned_word)[p_idx] = '\0';}
#define End_Phoned_Word do {(*phoned_word)[p_idx] = '\0';} while (0)
/* How long is the phoned word? */
#define Phone_Len (p_idx)