isl_pip.c: check return value of fscanf
authorSven Verdoolaege <skimo@purples.(none)>
Sun, 6 Sep 2009 11:01:40 +0000 (13:01 +0200)
committerSven Verdoolaege <skimo@purples.(none)>
Sun, 6 Sep 2009 15:57:15 +0000 (17:57 +0200)
pip.c

diff --git a/pip.c b/pip.c
index 94e7af9..52e3dfa 100644 (file)
--- a/pip.c
+++ b/pip.c
@@ -44,10 +44,12 @@ int main(int argc, char **argv)
        int urs_parms = 0;
        int urs_unknowns = 0;
        int max = 0;
+       int n;
 
        context = isl_basic_set_read_from_file(ctx, stdin, 0, ISL_FORMAT_POLYLIB);
        assert(context);
-       fscanf(stdin, "%d", &neg_one);
+       n = fscanf(stdin, "%d", &neg_one);
+       assert(n == 1);
        assert(neg_one == -1);
        bset = isl_basic_set_read_from_file(ctx, stdin,
                isl_basic_set_dim(context, isl_dim_set), ISL_FORMAT_POLYLIB);