[Ltrace-devel] [PATCH 2/6] Make sure there's at least one space after "typedef" when parsing
Роман Донченко
dpb at corrigendum.ru
Mon Apr 20 00:39:23 UTC 2015
Otherwise, a function declaration whose return type starts with
"typedef" might mistakenly get recognized as a typedef.
---
read_config_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/read_config_file.c b/read_config_file.c
index 427c0ea..56e3519 100644
--- a/read_config_file.c
+++ b/read_config_file.c
@@ -1072,7 +1072,7 @@ process_line(struct protolib *plib, struct locus *loc, char *buf)
if (*str == ';' || *str == 0 || *str == '\n' || *str == '#')
return 0;
- if (strncmp(str, "typedef", 7) == 0) {
+ if (strncmp(str, "typedef ", 8) == 0) {
parse_typedef(plib, loc, &str);
return 0;
}
--
1.8.5.6
More information about the Ltrace-devel
mailing list