From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11245 invoked by alias); 15 Nov 2010 04:09:05 -0000 Received: (qmail 11234 invoked by uid 22791); 15 Nov 2010 04:09:04 -0000 X-SWARE-Spam-Status: No, hits=0.6 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Nov 2010 04:08:28 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LBW00H00RDWYE00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Mon, 15 Nov 2010 06:08:07 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBW00HY2RHIVA20@a-mtaout22.012.net.il>; Mon, 15 Nov 2010 06:08:07 +0200 (IST) Date: Mon, 15 Nov 2010 04:09:00 -0000 From: Eli Zaretskii Subject: Re: [patch]change dwarf2_start_subfile() to adapt inappropriate dir name In-reply-to: <19193243.6341289784074300.JavaMail.weblogic@epml17> To: j0.kim@samsung.com Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83oc9rcjps.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <19193243.6341289784074300.JavaMail.weblogic@epml17> X-IsSubscribed: yes 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 X-SW-Source: 2010-11/txt/msg00171.txt.bz2 > Date: Mon, 15 Nov 2010 01:21:14 +0000 (GMT) > From: JuYoung Kim > Cc: 김주영 > >   if (!IS_ABSOLUTE_PATH (filename) && dirname != NULL) { >      if (dirname[strlen(dirname)-1] == '/' || dirname[strlen(dirname)-1] == '') Please use IS_DIR_SEPARATOR instead of testing for '/' literally. And the second part of the if clause cannot happen at all, so it should be removed. Also, the GNU coding standards say to put the braces like this: if (something) { do_something; do_something_else; } >      else fullname = concat (dirname, SLASH_STRING, filename, (char *)NULL); Make "else" have its own line, like this: else fullname = concat (dirname, SLASH_STRING, filename, NULL);