diff options
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index c25dadf..18ee9bb 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1127,16 +1127,15 @@ get_regcomp_error (int code, regex_t *rx) } /* Compile a regexp and throw an exception on error. This returns a - cleanup to free the resulting pattern on success. If RX is NULL, - this does nothing and returns NULL. */ + cleanup to free the resulting pattern on success. RX must not be + NULL. */ struct cleanup * compile_rx_or_error (regex_t *pattern, const char *rx, const char *message) { int code; - if (!rx) - return NULL; + gdb_assert (rx != NULL); code = regcomp (pattern, rx, REG_NOSUB); if (code != 0) |