All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hagen Paul Pfeifer <hagen-GvnIQ6b/HdU@public.gmane.org>
To: "Diego 'Flameeyes' Pettenò"
	<flameeyes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1/1] define memdup() static
Date: Sun, 10 Feb 2008 21:52:15 +0100	[thread overview]
Message-ID: <20080210205209.GA2539@nuttenaction> (raw)

memdup() is only referenced from dwarves.c. This patch defines them
static. Further symbol hiding can be accomplished via GCC attributes:

#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# define DWARVES_NO_EXPORT __attribute__((visibility("hidden")))
#else
# define DWARVES_NO_EXPORT
#endif

Signed-off-by: Hagen Paul Pfeifer <hagen-GvnIQ6b/HdU@public.gmane.org>
---
 dwarves.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dwarves.c b/dwarves.c
index 813c67b..aa9510e 100644
--- a/dwarves.c
+++ b/dwarves.c
@@ -114,7 +114,7 @@ static void *zalloc(const size_t size)
 	return s;
 }
 
-void *memdup(const void *src, size_t len)
+static void *memdup(const void *src, size_t len)
 {
 	void *s = malloc(len);
 	if (s != NULL)
-- 
1.5.3.8

             reply	other threads:[~2008-02-10 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-10 20:52 Hagen Paul Pfeifer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-02-12  0:11 [PATCH 1/1] define memdup() static Arnaldo Carvalho de Melo
     [not found] ` <20080212001138.GC4157-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2008-02-12  0:37   ` Hagen Paul Pfeifer
2008-02-12  1:12     ` Arnaldo Carvalho de Melo
     [not found]       ` <20080212011242.GD4157-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2008-02-12  1:30         ` Hagen Paul Pfeifer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080210205209.GA2539@nuttenaction \
    --to=hagen-gvniq6b/hdu@public.gmane.org \
    --cc=dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=flameeyes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.