summaryrefslogtreecommitdiff
path: root/ASNMP
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-11-02 19:52:57 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-11-02 19:52:57 +0000
commit67f4974bf28cccf4b67494448c61f95453651fa7 (patch)
treee614294baa1e8c0296595f3a972dbb216faaecfe /ASNMP
parent4448019dc0323cc5964c9a19a55551da3e378b20 (diff)
downloadATCD-67f4974bf28cccf4b67494448c61f95453651fa7.tar.gz
ChangeLogTag: Tue Nov 2 13:51:15 2004 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'ASNMP')
-rw-r--r--ASNMP/asnmp/asn1.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/ASNMP/asnmp/asn1.cpp b/ASNMP/asnmp/asn1.cpp
index baeffbccd22..59b0fa9f8bf 100644
--- a/ASNMP/asnmp/asn1.cpp
+++ b/ASNMP/asnmp/asn1.cpp
@@ -194,7 +194,7 @@ u_char * asn1::build_int( u_char *data,
* consecutive 1's or 0's at the most significant end of the
* integer.
*/
- mask = 0x1FF << ((8 * (sizeof(long) - 1)) - 1);
+ mask = u_long (0x1FF) << ((8 * (sizeof(u_long) - 1)) - 1);
/* mask is 0xFF800000 on a big-endian machine */
while((((integer & mask) == 0) || ((integer & mask) == mask))
&& intsize > 1){
@@ -207,7 +207,7 @@ u_char * asn1::build_int( u_char *data,
if (*datalength < intsize)
return 0;
*datalength -= intsize;
- mask = 0xFF << (8 * (sizeof(long) - 1));
+ mask = u_long (0xFF) << (8 * (sizeof(u_long) - 1));
/* mask is 0xFF000000 on a big-endian machine */
while(intsize--){
*data++ = (u_char)((integer & mask) >> (8 * (sizeof(long) - 1)));
@@ -245,7 +245,7 @@ u_char * asn1::build_unsigned_int( u_char *data,
if (intsize != sizeof (long))
return 0;
integer = *intp;
- mask = 0xFF << (8 * (sizeof(long) - 1));
+ mask = u_long (0xFF) << (8 * (sizeof(u_long) - 1));
/* mask is 0xFF000000 on a big-endian machine */
if ((u_char)((integer & mask) >> (8 * (sizeof(long) - 1))) & 0x80){
/* if MSB is set */
@@ -257,7 +257,7 @@ u_char * asn1::build_unsigned_int( u_char *data,
* There should be no sequence of 9 consecutive 1's or 0's at the most significant end of the
* integer.
*/
- mask = 0x1FF << ((8 * (sizeof(long) - 1)) - 1);
+ mask = u_long (0x1FF) << ((8 * (sizeof(u_long) - 1)) - 1);
/* mask is 0xFF800000 on a big-endian machine */
while((((integer & mask) == 0) || ((integer & mask) == mask)) && intsize > 1){
intsize--;
@@ -273,7 +273,7 @@ u_char * asn1::build_unsigned_int( u_char *data,
*data++ = '\0';
intsize--;
}
- mask = 0xFF << (8 * (sizeof(long) - 1));
+ mask = u_long (0xFF) << (8 * (sizeof(u_long) - 1));
/* mask is 0xFF000000 on a big-endian machine */
while(intsize--){
*data++ = (u_char)((integer & mask) >> (8 * (sizeof(long) - 1)));
@@ -921,7 +921,7 @@ u_char * asn1::build_unsigned_int64( u_char *data,
intsize = 8;
low = cp->low;
high = cp->high;
- mask = 0xFF << (8 * (sizeof(long) - 1));
+ mask = u_long (0xFF) << (8 * (sizeof(u_long) - 1));
/* mask is 0xFF000000 on a big-endian machine */
if ((u_char)((high & mask) >> (8 * (sizeof(long) - 1))) & 0x80){
/* if MSB is set */
@@ -934,7 +934,7 @@ u_char * asn1::build_unsigned_int64( u_char *data,
* There should be no sequence of 9 consecutive 1's or 0's at the most
* significant end of the integer.
*/
- mask2 = 0x1FF << ((8 * (sizeof(long) - 1)) - 1);
+ mask2 = u_long (0x1FF) << ((8 * (sizeof(u_long) - 1)) - 1);
/* mask2 is 0xFF800000 on a big-endian machine */
while((((high & mask2) == 0) || ((high & mask2) == mask2))
&& intsize > 1){