summaryrefslogtreecommitdiff
path: root/libntp/inttoa.c
diff options
context:
space:
mode:
authorOllivier Robert <roberto@FreeBSD.org>2008-08-17 17:37:33 +0000
committerOllivier Robert <roberto@FreeBSD.org>2008-08-17 17:37:33 +0000
commitcce65f439697627afbccf5a67035a957bb4d784a (patch)
tree16d100fbc9dae63888d48b464e471ba0e5065193 /libntp/inttoa.c
parent8c24a1e0ffd629427f94da1b681600008030c41a (diff)
Notes
Diffstat (limited to 'libntp/inttoa.c')
-rw-r--r--libntp/inttoa.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libntp/inttoa.c b/libntp/inttoa.c
new file mode 100644
index 000000000000..f27073339809
--- /dev/null
+++ b/libntp/inttoa.c
@@ -0,0 +1,20 @@
+/*
+ * inttoa - return an asciized signed integer
+ */
+#include <stdio.h>
+
+#include "lib_strbuf.h"
+#include "ntp_stdlib.h"
+
+char *
+inttoa(
+ long ival
+ )
+{
+ register char *buf;
+
+ LIB_GETBUF(buf);
+
+ (void) sprintf(buf, "%ld", (long)ival);
+ return buf;
+}