* Rewrote sort_msglist_cmp() without compiler warnings.
authorArt Cancro <ajc@citadel.org>
Mon, 13 Apr 2009 18:32:33 +0000 (18:32 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 13 Apr 2009 18:32:33 +0000 (18:32 +0000)
citadel/room_ops.c

index e1d501a1c4cf7860a4544126136d64de52111303..3303979f6877e8a10b3a9dd76b2ae37e11aa190e 100644 (file)
@@ -496,9 +496,9 @@ void delete_msglist(struct ctdlroom *whichroom)
 /*
  * Message pointer compare function for sort_msglist()
  */
-int sort_msglist_cmp(long *m1, long *m2) {
-       if (*m1 > *m2) return(1);
-       if (*m1 < *m2) return(-1);
+int sort_msglist_cmp(const void *m1, const void *m2) {
+       if ((*(const long *)m1) > (*(const long *)m2)) return(1);
+       if ((*(const long *)m1) < (*(const long *)m2)) return(-1);
        return(0);
 }