summaryrefslogtreecommitdiff
path: root/source4/libcli/util/asn1.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-08-31 07:14:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:26 -0500
commit0575d5e0d2d1548ce2f6d133ccebe65a0b6b7745 (patch)
tree3f1d8e19af0f437f01d0d324838d38b2e0b32633 /source4/libcli/util/asn1.c
parent776d90d801ee253157f9de90416a93bfc7bfd55e (diff)
downloadsamba-0575d5e0d2d1548ce2f6d133ccebe65a0b6b7745.tar.gz
samba-0575d5e0d2d1548ce2f6d133ccebe65a0b6b7745.tar.bz2
samba-0575d5e0d2d1548ce2f6d133ccebe65a0b6b7745.zip
r2124: merge from trunk (-r 2123):
Argl. I could never get the naming right. Having the most significant byte at the lowest memory address is big endian, at least according to the google search for 'big endian'.... Volker (This used to be commit bc4c188362901423cc900fd4bdfa4a9ed6838f2b)
Diffstat (limited to 'source4/libcli/util/asn1.c')
-rw-r--r--source4/libcli/util/asn1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index 756a33f77d..7025808a1e 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -107,13 +107,13 @@ BOOL asn1_pop_tag(ASN1_DATA *data)
return True;
}
-static void push_int_littleendian(ASN1_DATA *data, int i)
+static void push_int_bigendian(ASN1_DATA *data, int i)
{
uint8_t lowest = i & 0xFF;
i = i >> 8;
if (i != 0)
- push_int_littleendian(data, i);
+ push_int_bigendian(data, i);
asn1_write_uint8(data, lowest);
}
@@ -123,7 +123,7 @@ static void push_int_littleendian(ASN1_DATA *data, int i)
BOOL asn1_write_Integer(ASN1_DATA *data, int i)
{
if (!asn1_push_tag(data, ASN1_INTEGER)) return False;
- push_int_littleendian(data, i);
+ push_int_bigendian(data, i);
return asn1_pop_tag(data);
}