summaryrefslogtreecommitdiffstats
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-12 09:30:20 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2007-07-12 09:30:20 +0200
commit93abe4f36b22c7f84bd40eb24c9d39a4f6631c2b (patch)
tree62a934c83838b5cab7594fa61b23efcdaaf8ac45 /lib/vsprintf.c
parent64042b5672f016a2e878337ed74de6f7aa08aad6 (diff)
downloadbarebox-93abe4f36b22c7f84bd40eb24c9d39a4f6631c2b.tar.gz
barebox-93abe4f36b22c7f84bd40eb24c9d39a4f6631c2b.tar.xz
make printf position independent
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 77fb2a450a..c6fbfe35dd 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -15,6 +15,7 @@
#include <linux/ctype.h>
#include <common.h>
+#include <reloc.h>
unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
{
@@ -114,11 +115,11 @@ static char * number(char * str, long num, int base, int size, int precision ,in
#endif
{
char c,sign,tmp[66];
- const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
+ const char *digits = RELOC("0123456789abcdefghijklmnopqrstuvwxyz");
int i;
if (type & LARGE)
- digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ digits = RELOC("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
if (type & LEFT)
type &= ~ZEROPAD;
if (base < 2 || base > 36)
@@ -269,7 +270,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
case 's':
s = va_arg(args, char *);
if (!s)
- s = "<NULL>";
+ s = RELOC("<NULL>");
len = strnlen(s, precision);