projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d3735c
)
isl_handle_error: avoid use of isl_options_get_on_error
author
Sven Verdoolaege
<skimo@kotnet.org>
Thu, 19 Jul 2012 11:29:36 +0000
(13:29 +0200)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Fri, 27 Jul 2012 16:20:09 +0000
(18:20 +0200)
isl_options_get_on_error could end up calling isl_handle_error
recursively, resulting in an infinite calling sequence.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_ctx.c
patch
|
blob
|
history
diff --git
a/isl_ctx.c
b/isl_ctx.c
index
10bcbf9
..
e5f1d08
100644
(file)
--- a/
isl_ctx.c
+++ b/
isl_ctx.c
@@
-9,14
+9,17
@@
#include <isl_ctx_private.h>
#include <isl/vec.h>
-#include <isl
/options
.h>
+#include <isl
_options_private
.h>
void isl_handle_error(isl_ctx *ctx, enum isl_error error, const char *msg,
const char *file, int line)
{
+ if (!ctx)
+ return;
+
isl_ctx_set_error(ctx, error);
- switch (
isl_options_get_on_error(ctx)
) {
+ switch (
ctx->opt->on_error
) {
case ISL_ON_ERROR_WARN:
fprintf(stderr, "%s:%d: %s\n", file, line, msg);
return;