This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[patch][newlib][nano] Fix typo in malloc_mallopt
- From: "Joey Ye" <joey dot ye at arm dot com>
- To: <newlib at sourceware dot org>
- Cc: "Joey Ye" <Joey dot Ye at arm dot com>
- Date: Fri, 13 Sep 2013 17:56:32 +0800
- Subject: [patch][newlib][nano] Fix typo in malloc_mallopt
- Authentication-results: sourceware.org; auth=none
When use malloc_stats or mallopt, nano malloc will error:
mstats.c:(.text.mallopt+0xa): undefined reference to `_mallopt_r'
It was caused by a typo in nano-mallocr. Attached patch fixes this obvious
typo.
OK to trunk?
ChangeLog:
2013-09-13 Joey Ye <joey.ye@arm.com>
libc/stdlib/nano-mallocr.c (nano_allopt): Typo fixed to ...
(nano_mallopt): ... this.
diff --git a/newlib/libc/stdlib/nano-mallocr.c
b/newlib/libc/stdlib/nano-mallocr.c
index e0a9195..0d90680 100644
--- a/newlib/libc/stdlib/nano-mallocr.c
+++ b/newlib/libc/stdlib/nano-mallocr.c
@@ -72,7 +72,7 @@
#define nano_malloc_usable_size _malloc_usable_size_r
#define nano_malloc_stats _malloc_stats_r
#define nano_mallinfo _mallinfo_r
-#define nano_allopt _mallopt_r
+#define nano_mallopt _mallopt_r
#else /* ! INTERNAL_NEWLIB */
@@ -94,7 +94,7 @@
#define nano_malloc_usable_size malloc_usable_size
#define nano_malloc_stats malloc_stats
#define nano_mallinfo mallinfo
-#define nano_allopt mallopt
+#define nano_mallopt mallopt
#endif /* ! INTERNAL_NEWLIB */
/* Define free_list as internal name to avoid conflict with user names */