diff --git a/src/struniq.c b/src/struniq.c index e593a4d3..a42f7862 100644 --- a/src/struniq.c +++ b/src/struniq.c @@ -51,21 +51,17 @@ struniq_new (const char *s) } -/*---------------------------------. -| Return TRUE iff S is a struniq. | -`---------------------------------*/ +/*------------------------------. +| Abort if S is not a struniq. | +`------------------------------*/ -bool -struniq_assert_p (const char *s) +void +struniq_assert (const char *s) { if (!hash_lookup (struniqs_table, s)) { error (0, 0, "not a struniq: %s", quotearg (s)); - return false; - } - else - { - return true; + abort (); } } diff --git a/src/struniq.h b/src/struniq.h index adaee5d9..f72116c3 100644 --- a/src/struniq.h +++ b/src/struniq.h @@ -41,8 +41,7 @@ struniq_t struniq_new (const char *s); void struniqs_new (void); /* Die if S is not a struniq. */ -#define struniq_assert(S) assert (struniq_assert_p (S)); -bool struniq_assert_p (const char *s); +void struniq_assert (const char *s); /* Free all the memory allocated for symbols. */ void struniqs_free (void);