From 45200758872cf049989c4748b2ee4ae7beaff3bc Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 9 Aug 2016 15:16:25 +0200 Subject: [PATCH] isl_tab.c: perform_undo: return isl_stat This clarifies what the possible return values are. Signed-off-by: Sven Verdoolaege --- isl_tab.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/isl_tab.c b/isl_tab.c index a25da30d..610890b2 100644 --- a/isl_tab.c +++ b/isl_tab.c @@ -3836,8 +3836,9 @@ static void drop_samples_since(struct isl_tab *tab, int n) } } -static int perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) WARN_UNUSED; -static int perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) +static isl_stat perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) + WARN_UNUSED; +static isl_stat perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) { switch (undo->type) { case isl_tab_undo_rational: @@ -3862,7 +3863,7 @@ static int perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) return drop_bmap_div(tab, undo->u.var_index); case isl_tab_undo_saved_basis: if (restore_basis(tab, undo->u.col_var) < 0) - return -1; + return isl_stat_error; break; case isl_tab_undo_drop_sample: tab->n_outside--; @@ -3873,9 +3874,9 @@ static int perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) case isl_tab_undo_callback: return undo->u.callback->run(undo->u.callback); default: - isl_assert(tab->mat->ctx, 0, return -1); + isl_assert(tab->mat->ctx, 0, return isl_stat_error); } - return 0; + return isl_stat_ok; } /* Return the tableau to the state it was in when the snapshot "snap" -- 2.11.4.GIT