summaryrefslogtreecommitdiffstats
path: root/runtime/vsprintf.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2007-10-21 16:34:49 -0400
committerFrank Ch. Eigler <fche@elastic.org>2007-10-21 16:34:49 -0400
commit24993e4fcae48ca014e6b53f3f9a011c9cfa8f06 (patch)
tree90080b050ab62e79e7d111cc764a75dba91ad485 /runtime/vsprintf.c
parent11088605d9c0ab753e613b9ae52b6e59948cfc83 (diff)
parentf994dd4997067ca69b3b10ff8fa1547987aed585 (diff)
downloadsystemtap-steved-24993e4fcae48ca014e6b53f3f9a011c9cfa8f06.tar.gz
systemtap-steved-24993e4fcae48ca014e6b53f3f9a011c9cfa8f06.tar.xz
systemtap-steved-24993e4fcae48ca014e6b53f3f9a011c9cfa8f06.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
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;