diff options
author | Denis Vlasenko | 2007-01-24 22:03:46 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-01-24 22:03:46 +0000 |
commit | e338dd95b45b39a1e3bc307adc98064173a0f9f3 (patch) | |
tree | ffbd0b893c8ba8088a2f034684b9745b49086dd8 /libbb | |
parent | 8942c12782d20367c8816d3cc83c5274735e932a (diff) | |
download | busybox-e338dd95b45b39a1e3bc307adc98064173a0f9f3.zip busybox-e338dd95b45b39a1e3bc307adc98064173a0f9f3.tar.gz |
accumulated post-1.4.0 fixes
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/vdprintf.c | 4 | ||||
-rw-r--r-- | libbb/xfuncs.c | 7 | ||||
-rw-r--r-- | libbb/xreadlink.c | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/libbb/vdprintf.c b/libbb/vdprintf.c index ea2a9d4..d16c519 100644 --- a/libbb/vdprintf.c +++ b/libbb/vdprintf.c @@ -7,12 +7,8 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <unistd.h> #include "libbb.h" - - #if defined(__GLIBC__) && __GLIBC__ < 2 int vdprintf(int d, const char *format, va_list ap) { diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index dc160bf..c059e41 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -81,13 +81,14 @@ char * xstrndup(const char *s, int n) t = (char*) s; while (m) { if (!*t) break; - m--; t++; + m--; + t++; } - n = n - m; + n -= m; t = xmalloc(n + 1); t[n] = '\0'; - return memcpy(t,s,n); + return memcpy(t, s, n); } // Die if we can't open a file and return a FILE * to it. diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c index 76f52ca..fb67cde 100644 --- a/libbb/xreadlink.c +++ b/libbb/xreadlink.c @@ -36,7 +36,7 @@ char *xreadlink(const char *path) char *xmalloc_realpath(const char *path) { -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) /* glibc provides a non-standard extension */ return realpath(path, NULL); #else |