summaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-01-24 22:02:01 +0000
committerDenis Vlasenko2007-01-24 22:02:01 +0000
commit218f2f4882482e1d023ddbf4b9f6cbf1f6b0145d (patch)
treee58717abf91e17db281fbbdfdc0072c198ce85b7 /libbb/xfuncs.c
parent84d2d493b4b664d1465cff955367fb9bc7769e5d (diff)
downloadbusybox-218f2f4882482e1d023ddbf4b9f6cbf1f6b0145d.zip
busybox-218f2f4882482e1d023ddbf4b9f6cbf1f6b0145d.tar.gz
accumulated post-1.4.0 fixes
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r--libbb/xfuncs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 4252e76..f6b904f 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.