From patchwork Thu Feb 6 10:07:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 24241 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-bk0-f72.google.com (mail-bk0-f72.google.com [209.85.214.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E998920143 for ; Thu, 6 Feb 2014 10:07:34 +0000 (UTC) Received: by mail-bk0-f72.google.com with SMTP id mx11sf2916146bkb.11 for ; Thu, 06 Feb 2014 02:07:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Lzsti5aiiGXxwTi6kRDIydaxSJX34sWGECHw4HNfXcA=; b=R/4GganZIugFyA2Qly7CV7nlWckLGyQ9rL+dzsOsQtilpF9nQLCnymw366yO/CcQQR vxiMQiZu8Ko2i4ZJnoWZXMtjNSYn1uQwU37FOEne7u6sU+RclB5WxtxUF4NYuSJzQJzv WzKmNpSKikfL2IQu3BtXFn5/jaS1c01Sw9nxadJbV8tmsfc3HgdsSLRFrAxJCl5gbQVw uDFiCO7srWtHe6a6i+mvhq78lteSaM29j9QMpcosPs3KymOkAKletc6GMovzFXdYKUuJ qoob+sg+2JHNQnsOSdABXSQ5nyij5ShPmYMHC7tzkgommW3zCKO0tMP61R3BwJlTXgBr FeBg== X-Gm-Message-State: ALoCoQkZERDD0CJnpjNJS/y5zhbj0kEfOilA7flO1hG+lh4VFsjuxZhLd6CWMVMHr8ORBsTN3KNz X-Received: by 10.112.27.138 with SMTP id t10mr2874509lbg.19.1391681252915; Thu, 06 Feb 2014 02:07:32 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.231 with SMTP id kt7ls82627lac.103.gmail; Thu, 06 Feb 2014 02:07:32 -0800 (PST) X-Received: by 10.112.138.233 with SMTP id qt9mr1352310lbb.34.1391681252737; Thu, 06 Feb 2014 02:07:32 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by mx.google.com with ESMTPS id kv5si250920lbc.21.2014.02.06.02.07.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Feb 2014 02:07:32 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.46 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id b8so1271285lan.5 for ; Thu, 06 Feb 2014 02:07:32 -0800 (PST) X-Received: by 10.152.170.232 with SMTP id ap8mr1007767lac.40.1391681252591; Thu, 06 Feb 2014 02:07:32 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.110.104 with SMTP id hz8csp22310lbb; Thu, 6 Feb 2014 02:07:32 -0800 (PST) X-Received: by 10.180.87.164 with SMTP id az4mr13970633wib.2.1391681251846; Thu, 06 Feb 2014 02:07:31 -0800 (PST) Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by mx.google.com with ESMTPS id hq3si11055901wib.38.2014.02.06.02.07.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Feb 2014 02:07:31 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.170 is neither permitted nor denied by best guess record for domain of will.newton@linaro.org) client-ip=74.125.82.170; Received: by mail-we0-f170.google.com with SMTP id w62so1138703wes.1 for ; Thu, 06 Feb 2014 02:07:31 -0800 (PST) X-Received: by 10.194.58.180 with SMTP id s20mr825972wjq.54.1391681251501; Thu, 06 Feb 2014 02:07:31 -0800 (PST) Received: from localhost.localdomain (cpc6-seac21-2-0-cust453.7-2.cable.virginm.net. [82.1.113.198]) by mx.google.com with ESMTPSA id y13sm1122618wjr.8.2014.02.06.02.07.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Feb 2014 02:07:30 -0800 (PST) From: Will Newton To: libc-alpha@sourceware.org Cc: patches@linaro.org Subject: [PATCH] malloc/mtrace.c: Cosmetic cleanup. Date: Thu, 6 Feb 2014 10:07:26 +0000 Message-Id: <1391681246-20126-1-git-send-email-will.newton@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.46 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Remove an unused #define and use ANSI prototypes. Generated code identical on x86_64-unknown-linux-gnu. ChangeLog: 2014-02-06 Will Newton * malloc/mtrace.c (attribute_hidden): Remove unused macro definition. (tr_where): Use ANSI protoype. (tr_freehook): Likewise. (tr_mallochook): Likewise. (tr_reallochook): Likewise. (tr_memalignhook): Likewise. --- malloc/mtrace.c | 41 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/malloc/mtrace.c b/malloc/mtrace.c index 99ebaff..91e5710 100644 --- a/malloc/mtrace.c +++ b/malloc/mtrace.c @@ -41,10 +41,6 @@ #include -#ifndef attribute_hidden -# define attribute_hidden -#endif - #define TRACE_BUFFER_SIZE 512 static FILE *mallstream; @@ -77,11 +73,8 @@ tr_break (void) } libc_hidden_def (tr_break) -static void tr_where (const __ptr_t, Dl_info *) __THROW internal_function; -static void -internal_function tr_where (caller, info) -const __ptr_t caller; -Dl_info *info; +static void internal_function +tr_where (const __ptr_t caller, Dl_info *info) { if (caller != NULL) { @@ -114,7 +107,6 @@ Dl_info *info; } } - static Dl_info * lock_and_info (const __ptr_t caller, Dl_info *mem) { @@ -128,11 +120,8 @@ lock_and_info (const __ptr_t caller, Dl_info *mem) return res; } - -static void tr_freehook (__ptr_t, const __ptr_t) __THROW; -static void tr_freehook (ptr, caller) -__ptr_t ptr; -const __ptr_t caller; +static void +tr_freehook (__ptr_t ptr, const __ptr_t caller) { if (ptr == NULL) return; @@ -157,10 +146,8 @@ const __ptr_t caller; __libc_lock_unlock (lock); } -static __ptr_t tr_mallochook (size_t, const __ptr_t) __THROW; -static __ptr_t tr_mallochook (size, caller) -size_t size; -const __ptr_t caller; +static __ptr_t +tr_mallochook (size_t size, const __ptr_t caller) { __ptr_t hdr; @@ -186,12 +173,8 @@ const __ptr_t caller; return hdr; } -static __ptr_t tr_reallochook (__ptr_t, size_t, const __ptr_t) -__THROW; -static __ptr_t tr_reallochook (ptr, size, caller) -__ptr_t ptr; -size_t size; -const __ptr_t caller; +static __ptr_t +tr_reallochook (__ptr_t ptr, size_t size, const __ptr_t caller) { __ptr_t hdr; @@ -238,11 +221,8 @@ const __ptr_t caller; return hdr; } -static __ptr_t tr_memalignhook (size_t, size_t, - const __ptr_t) __THROW; -static __ptr_t tr_memalignhook (alignment, size, caller) -size_t alignment, size; -const __ptr_t caller; +static __ptr_t +tr_memalignhook (size_t alignment, size_t size, const __ptr_t caller) { __ptr_t hdr; @@ -271,7 +251,6 @@ const __ptr_t caller; } - #ifdef _LIBC /* This function gets called to make sure all memory the library