[dovecot-cvs] dovecot/src/lib-ntlm ntlm-byteorder.h, 1.1, 1.2 ntlm-message.c, 1.8, 1.9

cras at dovecot.org cras at dovecot.org
Tue Feb 14 20:59:21 EET 2006


Update of /var/lib/cvs/dovecot/src/lib-ntlm
In directory talvi:/tmp/cvs-serv11001/lib-ntlm

Modified Files:
	ntlm-byteorder.h ntlm-message.c 
Log Message:
While casting const pointers to something else, the const was often
unneededly dropped out in the middle of casts.



Index: ntlm-byteorder.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-ntlm/ntlm-byteorder.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ntlm-byteorder.h	28 Jul 2004 15:39:30 -0000	1.1
+++ ntlm-byteorder.h	14 Feb 2006 18:59:19 -0000	1.2
@@ -16,17 +16,17 @@
 
 static inline uint16_t read_le16(const void *addr)
 {
-	return *((uint16_t *) addr);
+	return *((const uint16_t *) addr);
 }
 
 static inline uint32_t read_le32(const void *addr)
 {
-	return *((uint32_t *) addr);
+	return *((const uint32_t *) addr);
 }
 
 static inline uint64_t read_le64(const void *addr)
 {
-	return *((uint64_t *) addr);
+	return *((const uint64_t *) addr);
 }
 
 static inline void write_le16(void *addr, const uint16_t value)

Index: ntlm-message.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-ntlm/ntlm-message.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ntlm-message.c	13 Jan 2006 20:26:19 -0000	1.8
+++ ntlm-message.c	14 Feb 2006 18:59:19 -0000	1.9
@@ -25,7 +25,7 @@
 			     bool unicode)
 {
 	unsigned int len = read_le16(&buffer->length);
-	const char *p = ((char *) message) + read_le32(&buffer->offset);
+	const char *p = ((const char *) message) + read_le32(&buffer->offset);
 	string_t *str;
 
 	if (unicode)



More information about the dovecot-cvs mailing list