diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-12-31 11:56:08 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-12-31 12:17:00 +0000 |
commit | f4413ca65a2b5bf469df3a4ab05d965e5f59c91d (patch) | |
tree | 0b6dcbe899e8962f04a54d5aa69097a48785a386 | |
parent | 7873f9bdbd9ec1f0746ca0b4cd6468ecac0e2880 (diff) |
endian: Renamed functions for curl API naming convention
-rw-r--r-- | lib/curl_ntlm_core.c | 2 | ||||
-rw-r--r-- | lib/curl_ntlm_msgs.c | 6 | ||||
-rw-r--r-- | lib/endian.c | 14 | ||||
-rw-r--r-- | lib/endian.h | 10 |
4 files changed, 16 insertions, 16 deletions
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index 6dafeeb71..b28d21df0 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -654,7 +654,7 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, "%c%c%c%c", /* Reserved = 0 */ 0, 0, 0, 0); - write64_le(tw, ptr + 24); + Curl_write64_le(tw, ptr + 24); memcpy(ptr + 32, challenge_client, 8); memcpy(ptr + 44, ntlm->target_info, ntlm->target_info_len); diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c index 3d6cf53e0..c25bebe1e 100644 --- a/lib/curl_ntlm_msgs.c +++ b/lib/curl_ntlm_msgs.c @@ -173,8 +173,8 @@ static CURLcode ntlm_decode_type2_target(struct SessionHandle *data, unsigned int target_info_offset = 0; if(size >= 48) { - target_info_len = readshort_le(&buffer[40]); - target_info_offset = readint_le(&buffer[44]); + target_info_len = Curl_read16_le(&buffer[40]); + target_info_offset = Curl_read32_le(&buffer[44]); if(target_info_len > 0) { if(((target_info_offset + target_info_len) > size) || (target_info_offset < 48)) { @@ -287,7 +287,7 @@ CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data, return CURLE_BAD_CONTENT_ENCODING; } - ntlm->flags = readint_le(&type2[20]); + ntlm->flags = Curl_read32_le(&type2[20]); memcpy(ntlm->nonce, &type2[24], 8); if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) { diff --git a/lib/endian.c b/lib/endian.c index e1c2142d1..cf3e3c5e0 100644 --- a/lib/endian.c +++ b/lib/endian.c @@ -29,7 +29,7 @@ * package to whatever endian format we're using natively. Argument is a * pointer to a 2 byte buffer. */ -unsigned short readshort_le(unsigned char *buf) +unsigned short Curl_read16_le(unsigned char *buf) { return (unsigned short)(((unsigned short)buf[0]) | ((unsigned short)buf[1] << 8)); @@ -40,13 +40,13 @@ unsigned short readshort_le(unsigned char *buf) * incoming package to whatever endian format we're using natively. * Argument is a pointer to a 4 byte buffer. */ -unsigned int readint_le(unsigned char *buf) +unsigned int Curl_read32_le(unsigned char *buf) { return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) | ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24); } -void write32_le(const int value, unsigned char *buffer) +void Curl_write32_le(const int value, unsigned char *buffer) { buffer[0] = (char)(value & 0x000000FF); buffer[1] = (char)((value & 0x0000FF00) >> 8); @@ -56,12 +56,12 @@ void write32_le(const int value, unsigned char *buffer) #if (CURL_SIZEOF_CURL_OFF_T > 4) #if defined(HAVE_LONGLONG) -void write64_le(const long long value, unsigned char *buffer) +void Curl_write64_le(const long long value, unsigned char *buffer) #else -void write64_le(const __int64 value, unsigned char *buffer) +void Curl_write64_le(const __int64 value, unsigned char *buffer) #endif { - write32_le((int)value, buffer); - write32_le((int)(value >> 32), buffer + 4); + Curl_write32_le((int)value, buffer); + Curl_write32_le((int)(value >> 32), buffer + 4); } #endif diff --git a/lib/endian.h b/lib/endian.h index 3b0e08d1c..852fef376 100644 --- a/lib/endian.h +++ b/lib/endian.h @@ -22,16 +22,16 @@ * ***************************************************************************/ -unsigned short readshort_le(unsigned char *buf); -unsigned int readint_le(unsigned char *buf); +unsigned short Curl_read16_le(unsigned char *buf); +unsigned int Curl_read32_le(unsigned char *buf); -void write32_le(const int value, unsigned char *buffer); +void Curl_write32_le(const int value, unsigned char *buffer); #if (CURL_SIZEOF_CURL_OFF_T > 4) #if defined(HAVE_LONGLONG) -void write64_le(const long long value, unsigned char *buffer); +void Curl_write64_le(const long long value, unsigned char *buffer); #else -void write64_le(const __int64 value, unsigned char *buffer); +void Curl_write64_le(const __int64 value, unsigned char *buffer); #endif #endif |