From a88254897b522f0966b3e479a69f4f5c074d5e63 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 5 Mar 2017 15:28:05 +0000 Subject: Revert "make urldb internal parse macros less prone to control flow errors" This reverts commit 718da3ffffd1181a0b5b2d590214bc408ca44117. These macros are used in a way that causes safe macros to break --- content/urldb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/urldb.c b/content/urldb.c index c1c39c145..60944f7e5 100644 --- a/content/urldb.c +++ b/content/urldb.c @@ -3796,7 +3796,7 @@ void urldb_load_cookies(const char *filename) if (!fp) return; -#define FIND_T do { \ +#define FIND_T { \ for (; *p && *p != '\t'; p++) \ ; /* do nothing */ \ if (p >= end) { \ @@ -3804,16 +3804,16 @@ void urldb_load_cookies(const char *filename) continue; \ } \ *p++ = '\0'; \ - } while(0) +} -#define SKIP_T do { \ +#define SKIP_T { \ for (; *p && *p == '\t'; p++) \ ; /* do nothing */ \ if (p >= end) { \ LOG("Overran input"); \ continue; \ } \ - } while(0) +} while (fgets(s, sizeof s, fp)) { char *p = s, *end = 0, -- cgit v1.2.3