From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10664 invoked by alias); 13 May 2013 02:53:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10636 invoked by uid 89); 13 May 2013 02:53:36 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_EG autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 13 May 2013 02:53:36 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UbitK-0004Uy-Du from Yao_Qi@mentor.com ; Sun, 12 May 2013 19:53:34 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 12 May 2013 19:53:34 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Sun, 12 May 2013 19:53:32 -0700 Message-ID: <519055B5.10803@codesourcery.com> Date: Mon, 13 May 2013 02:53:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Tom Tromey CC: Subject: Re: [PATCH 39/40] fix compile_rx_or_error References: In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-05/txt/msg00413.txt.bz2 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 (齐尧)