summaryrefslogtreecommitdiffstats
path: root/runtime/vsprintf.c
diff options
context:
space:
mode:
authorhunt <hunt>2007-10-17 12:52:27 +0000
committerhunt <hunt>2007-10-17 12:52:27 +0000
commit04fa6e021596935f96dc755d5f7bc56ae4884ca9 (patch)
tree168b2efdb85ea5c259f4a47f01906967daae0f52 /runtime/vsprintf.c
parentde14b6dab7064616fe2828c7ead9cca6a48463ce (diff)
downloadsystemtap-steved-04fa6e021596935f96dc755d5f7bc56ae4884ca9.tar.gz
systemtap-steved-04fa6e021596935f96dc755d5f7bc56ae4884ca9.tar.xz
systemtap-steved-04fa6e021596935f96dc755d5f7bc56ae4884ca9.zip
2007-10-17 Martin Hunt <hunt@redhat.com>
PR5000 * vsprintf.c: Remove _stp_endian.
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;