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:
55a3165
)
isl_test.c: test_output: avoid invalid access on error
author
Sven Verdoolaege
<skimo@kotnet.org>
Thu, 29 Nov 2012 21:53:30 +0000
(22:53 +0100)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Sat, 1 Dec 2012 16:38:07 +0000
(17:38 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_test.c
patch
|
blob
|
history
diff --git
a/isl_test.c
b/isl_test.c
index
4532afa
..
603622d
100644
(file)
--- a/
isl_test.c
+++ b/
isl_test.c
@@
-2969,7
+2969,10
@@
int test_output(isl_ctx *ctx)
s = isl_printer_get_str(p);
isl_printer_free(p);
isl_pw_aff_free(pa);
- equal = !strcmp(s, "(2 - x + 4*floord(x, 4) >= 0) ? (1) : 2");
+ if (!s)
+ equal = -1;
+ else
+ equal = !strcmp(s, "(2 - x + 4*floord(x, 4) >= 0) ? (1) : 2");
free(s);
if (equal < 0)
return -1;