Dwarves Archive on lore.kernel.org
 help / color / Atom feed
* Re: [PATCH 1/1] define memdup() static
@ 2008-02-12  0:11 Arnaldo Carvalho de Melo
       [not found] ` <20080212001138.GC4157-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2008-02-12  0:11 UTC (permalink / raw)
  To: Hagen Paul Pfeifer; +Cc: dwarves-u79uwXL29TY76Z2rM5mHXA

Applied,

Thanks a lot!

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 1/1] define memdup() static
@ 2008-02-10 20:52 Hagen Paul Pfeifer
  0 siblings, 0 replies; 5+ messages in thread
From: Hagen Paul Pfeifer @ 2008-02-10 20:52 UTC (permalink / raw)
  To: Diego 'Flameeyes' Pettenò, dwarves-u79uwXL29TY76Z2rM5mHXA

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2008-02-10 20:52 Hagen Paul Pfeifer

Dwarves Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dwarves/0 dwarves/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dwarves dwarves/ https://lore.kernel.org/dwarves \
		dwarves@vger.kernel.org
	public-inbox-index dwarves

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dwarves


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git