From patchwork Sat Sep 11 15:51:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 172132 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8BFrsFv029069 for ; Sat, 11 Sep 2010 15:54:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188Ab0IKPyO (ORCPT ); Sat, 11 Sep 2010 11:54:14 -0400 Received: from mail-gw0-f46.google.com ([74.125.83.46]:53064 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394Ab0IKPyN (ORCPT ); Sat, 11 Sep 2010 11:54:13 -0400 Received: by mail-gw0-f46.google.com with SMTP id 17so1555732gwj.19 for ; Sat, 11 Sep 2010 08:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=kWA4ej79P4A4yqw6tb2zQst+I3u5OaTu4ZxD+J6iM+4=; b=H18aYwA0lo/4awXxjViq83SngHnT6R400ZEu5CnDvxc02iD/l8A8wwEQ04CLGm66CL WPZLiymtGL0/fbFl6MjUSa/vk03jRMJq7MhyS65zSlQFg6XHtBMJy92JkMlauHM70Xck eHz5GwfoXxO0St59JLxBVJDqke4/HoLLRCkeI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=rK+SGyVRbc5BDd+OBV3UTvvkIcrCvPw13r4/u8F8vB3kIKbz8oPjl3J31e6CU4ZcRv ZnhzM3gyi2X425omiz2KrHkn16XpoZc9IRCBBJKBrtiKUJh6ZGhBAf03Hjh36UcqTKK8 n6uuL8qzuAskVaVJ9eJGiTeo4LEoON5IpbluU= Received: by 10.151.156.18 with SMTP id i18mr818866ybo.315.1284220453623; Sat, 11 Sep 2010 08:54:13 -0700 (PDT) Received: from localhost.localdomain (69-165-136-93.dsl.teksavvy.com [69.165.136.93]) by mx.google.com with ESMTPS id m12sm4025812ybn.19.2010.09.11.08.54.12 (version=SSLv3 cipher=RC4-MD5); Sat, 11 Sep 2010 08:54:12 -0700 (PDT) From: Arnaud Lacombe To: Sam Ravnborg , Michal Marek Cc: linux-kbuild , Arnaud Lacombe Subject: [PATCH 13/15] kconfig: expand file names Date: Sat, 11 Sep 2010 11:51:20 -0400 Message-Id: <1284220282-3500-14-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.2.30.gc37d7.dirty In-Reply-To: <1284220282-3500-1-git-send-email-lacombar@gmail.com> References: <1284220282-3500-1-git-send-email-lacombar@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 11 Sep 2010 15:54:14 +0000 (UTC) diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index 78b5c04..584390d 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -12,15 +12,18 @@ struct file *file_lookup(const char *name) { struct file *file; + const char *file_name = sym_expand_string_value(name); for (file = file_list; file; file = file->next) { - if (!strcmp(name, file->name)) + if (!strcmp(name, file->name)) { + free(file_name); return file; + } } file = malloc(sizeof(*file)); memset(file, 0, sizeof(*file)); - file->name = strdup(name); + file->name = file_name; file->next = file_list; file_list = file; return file;