summaryrefslogtreecommitdiff
path: root/shell/msh.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-03-27 22:01:31 +0000
committerDenis Vlasenko2007-03-27 22:01:31 +0000
commit10457b90db925369739a900445b640364eda5e4c (patch)
tree6d6f18564291257738360d97712724868175167e /shell/msh.c
parentf4d40c87d3a18fccb8c0946fc09f1d8f24a2bcf3 (diff)
downloadbusybox-10457b90db925369739a900445b640364eda5e4c.zip
busybox-10457b90db925369739a900445b640364eda5e4c.tar.gz
make pidfile writing configurable.
[ui]toa_to_buf: change API. No users yet.
Diffstat (limited to 'shell/msh.c')
-rw-r--r--shell/msh.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/msh.c b/shell/msh.c
index 66b10f3..50ec90b 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -49,7 +49,7 @@ static char *find_applet_by_name(const char *applet)
{
return NULL;
}
-static void utoa_to_buf(unsigned n, char *buf, unsigned buflen)
+static char *utoa_to_buf(unsigned n, char *buf, unsigned buflen)
{
unsigned i, out, res;
assert(sizeof(unsigned) == 4);
@@ -64,22 +64,22 @@ static void utoa_to_buf(unsigned n, char *buf, unsigned buflen)
*buf++ = '0' + res;
}
}
- *buf = '\0';
}
+ return buf;
}
-static void itoa_to_buf(int n, char *buf, unsigned buflen)
+static char *itoa_to_buf(int n, char *buf, unsigned buflen)
{
if (buflen && n < 0) {
n = -n;
*buf++ = '-';
buflen--;
}
- utoa_to_buf((unsigned)n, buf, buflen);
+ return utoa_to_buf((unsigned)n, buf, buflen);
}
static char local_buf[12];
static char *itoa(int n)
{
- itoa_to_buf(n, local_buf, sizeof(local_buf));
+ *(itoa_to_buf(n, local_buf, sizeof(local_buf))) = '\0';
return local_buf;
}
#else