diff options
author | Patrick McHardy <kaber@trash.net> | 2014-01-10 12:26:35 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2014-01-10 12:26:35 +0000 |
commit | 3f8820318302da097795ba7d8b2ae3f6dff6cf2e (patch) | |
tree | e0d8846a216c4a2a5f303813abc5878f3384b127 /src/datatype.c | |
parent | 488196551e5e34af3df5d92358f3efa5a08f5730 (diff) | |
parent | 4097ad726fce2398b42795d7b316d39fb8ea6ee5 (diff) |
Merge remote-tracking branch 'origin/master' into next-3.14
Diffstat (limited to 'src/datatype.c')
-rw-r--r-- | src/datatype.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/datatype.c b/src/datatype.c index fdcec8d1..e228f530 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -248,10 +248,8 @@ static struct error_record *integer_type_parse(const struct expr *sym, if (gmp_sscanf(sym->identifier, "%Zu%n", v, &len) != 1 || (int)strlen(sym->identifier) != len) { mpz_clear(v); - if (sym->dtype != &integer_type) { - return error(&sym->location, "This is not a valid %s", - sym->dtype->desc); - } + if (sym->dtype != &integer_type) + return NULL; return error(&sym->location, "Could not parse %s", sym->dtype->desc); } @@ -663,6 +661,7 @@ static struct error_record *mark_type_parse(const struct expr *sym, } } + *res = NULL; erec = sym->dtype->basetype->parse(sym, res); if (erec != NULL) return erec; |