aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-27 22:01:31 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-27 22:01:31 +0000
commit7044497649a54ea4045f4edd531f24bd6437a91b (patch)
tree6d6f18564291257738360d97712724868175167e /shell
parented223ba113de1fcc4a9193285dc8a89dd0d85863 (diff)
downloadbusybox-w32-7044497649a54ea4045f4edd531f24bd6437a91b.tar.gz
busybox-w32-7044497649a54ea4045f4edd531f24bd6437a91b.tar.bz2
busybox-w32-7044497649a54ea4045f4edd531f24bd6437a91b.zip
make pidfile writing configurable.
[ui]toa_to_buf: change API. No users yet. git-svn-id: svn://busybox.net/trunk/busybox@18254 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r--shell/msh.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/msh.c b/shell/msh.c
index 66b10f346..50ec90b0b 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -49,7 +49,7 @@ static char *find_applet_by_name(const char *applet)
49{ 49{
50 return NULL; 50 return NULL;
51} 51}
52static void utoa_to_buf(unsigned n, char *buf, unsigned buflen) 52static char *utoa_to_buf(unsigned n, char *buf, unsigned buflen)
53{ 53{
54 unsigned i, out, res; 54 unsigned i, out, res;
55 assert(sizeof(unsigned) == 4); 55 assert(sizeof(unsigned) == 4);
@@ -64,22 +64,22 @@ static void utoa_to_buf(unsigned n, char *buf, unsigned buflen)
64 *buf++ = '0' + res; 64 *buf++ = '0' + res;
65 } 65 }
66 } 66 }
67 *buf = '\0';
68 } 67 }
68 return buf;
69} 69}
70static void itoa_to_buf(int n, char *buf, unsigned buflen) 70static char *itoa_to_buf(int n, char *buf, unsigned buflen)
71{ 71{
72 if (buflen && n < 0) { 72 if (buflen && n < 0) {
73 n = -n; 73 n = -n;
74 *buf++ = '-'; 74 *buf++ = '-';
75 buflen--; 75 buflen--;
76 } 76 }
77 utoa_to_buf((unsigned)n, buf, buflen); 77 return utoa_to_buf((unsigned)n, buf, buflen);
78} 78}
79static char local_buf[12]; 79static char local_buf[12];
80static char *itoa(int n) 80static char *itoa(int n)
81{ 81{
82 itoa_to_buf(n, local_buf, sizeof(local_buf)); 82 *(itoa_to_buf(n, local_buf, sizeof(local_buf))) = '\0';
83 return local_buf; 83 return local_buf;
84} 84}
85#else 85#else