[dovecot-cvs] dovecot/src/imap imap-sort.c,1.27,1.28

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


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

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



Index: imap-sort.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-sort.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- imap-sort.c	5 Feb 2006 07:19:24 -0000	1.27
+++ imap-sort.c	14 Feb 2006 18:59:10 -0000	1.28
@@ -498,7 +498,7 @@
 
 static struct mail *get_mail(struct sort_context *ctx, const unsigned char *buf)
 {
-	unsigned int id = *((unsigned int *) buf);
+	unsigned int id = *((const unsigned int *)buf);
 	uint32_t seq;
 
 	if (!ctx->id_is_uid)
@@ -689,7 +689,8 @@
 	t_pop();
 
 	return ret != 0 ? ret :
-		(*((unsigned int *) p1) < *((unsigned int *) p2) ? -1 : 1);
+		(*((const unsigned int *)p1) <
+		 *((const unsigned int *)p2) ? -1 : 1);
 }
 
 static void mail_sort_flush(struct sort_context *ctx)



More information about the dovecot-cvs mailing list