summaryrefslogtreecommitdiffstats
path: root/runtime/vsprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/vsprintf.c')
-rw-r--r--runtime/vsprintf.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c
index 0e52f5c3..061aba3f 100644
--- a/runtime/vsprintf.c
+++ b/runtime/vsprintf.c
@@ -12,9 +12,6 @@
#ifndef _VSPRINTF_C_
#define _VSPRINTF_C_
-enum endian {STP_NATIVE=0, STP_LITTLE, STP_BIG};
-static enum endian _stp_endian = STP_NATIVE;
-
static int skip_atoi(const char **s)
{
int i=0;
@@ -213,37 +210,17 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
++str;
break;
case 2:
- if (_stp_endian != STP_NATIVE) {
- if (_stp_endian == STP_BIG)
- num = cpu_to_be16(num);
- else
- num = cpu_to_le16(num);
- }
if((str + 1) <= end)
*(int16_t *)str = (int16_t)num;
str+=2;
break;
case 8:
- if (_stp_endian != STP_NATIVE) {
- if (_stp_endian == STP_BIG)
- num = cpu_to_be64(num);
- else
- num = cpu_to_le64(num);
- }
-
if((str + 7) <= end)
*(int64_t *)str = num;
str+=8;
break;
case 4:
default: // "%4b" by default
- if (_stp_endian != STP_NATIVE) {
- if (_stp_endian == STP_BIG)
- num = cpu_to_be32(num);
- else
- num = cpu_to_le32(num);
- }
-
if((str + 3) <= end)
*(int32_t *)str = num;
str+=4;