[MPlayer-dev-eng] [patch] const-correct cast

Stefan Huehner stefan at huehner.org
Sun Jul 16 19:16:08 CEST 2006


Hi,

atttached patch corrects some cast, which before discards the const
qualifier.

Regards,
Stefan

-------------- next part --------------
--- subreader.c	(revision 19117)
+++ subreader.c	(working copy)
@@ -1823,12 +1823,12 @@
 
 static int compare_sub_priority(const void *a, const void *b)
 {
-    if (((subfn*)a)->priority > ((subfn*)b)->priority) {
+    if (((const subfn*)a)->priority > ((const subfn*)b)->priority) {
 	return -1;
-    } else if (((subfn*)a)->priority < ((subfn*)b)->priority) {
+    } else if (((const subfn*)a)->priority < ((const subfn*)b)->priority) {
 	return 1;
     } else {
-	return strcoll(((subfn*)a)->fname, ((subfn*)b)->fname);
+	return strcoll(((const subfn*)a)->fname, ((const subfn*)b)->fname);
     }
 }
 


More information about the MPlayer-dev-eng mailing list