summaryrefslogtreecommitdiff
path: root/tools/d2c/conv
diff options
context:
space:
mode:
Diffstat (limited to 'tools/d2c/conv')
-rw-r--r--tools/d2c/conv/tokens.l12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/d2c/conv/tokens.l b/tools/d2c/conv/tokens.l
index f1d196d..385f044 100644
--- a/tools/d2c/conv/tokens.l
+++ b/tools/d2c/conv/tokens.l
@@ -30,9 +30,15 @@
. {
char *msg;
- asprintf(&msg, "Unhandled token in d2c conv block: '%s'", yytext);
- YY_FATAL_ERROR(msg);
- free(msg);
+ int ret;
+ ret = asprintf(&msg, "Unhandled token in d2c conv block: '%s'", yytext);
+ if (ret == -1)
+ YY_FATAL_ERROR("Unhandled token in undisclosed d2c conv block");
+ else
+ {
+ YY_FATAL_ERROR(msg);
+ free(msg);
+ }
}