Re: [PATCH 39/40] fix compile_rx_or_error

Yao Qi
2013-05-13T02:53:43Z

On 05/10/2013 02:53 AM, Tom Tromey wrote:
> @@ -1127,17 +1127,14 @@ 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;
> -

Do we need an assert on RX here?

--
Yao (é½å°§)