[MPlayer-dev-eng] [PATCH] deobfuscate cookies.c
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Sun Nov 13 02:15:12 CET 2005
I've found this by accident. GCC whined about:
cookies.c:238: warning: comparisons like X<=Y<=Z do not have their mathematical meaning
cookies.c:241: warning: comparisons like X<=Y<=Z do not have their mathematical meaning
and it intrigued me, because I haven't seen a warning like that
yet. It must be some new GCC4 feature. Anyway, the code seems
unnecessarily complicated, so let's simplify it. Patch attached.
Regards,
R.
--
MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
We stand between the darkness ... and the light."
-- Delenn in Grey Council in Babylon 5:"Babylon Squared"
-------------- next part --------------
--- MPlayer-20051109/libmpdemux/cookies.c.warn 2003-12-09 12:27:10.000000000 +0100
+++ MPlayer-20051109/libmpdemux/cookies.c 2005-11-13 01:51:02.000000000 +0100
@@ -234,11 +234,9 @@
for (i = 0; i < found_cookies; i++) {
if (strcmp(list->name, cookies[i]->name) == 0) {
replacing = 0;
- if (strlen(list->domain) >
- strlen(cookies[i]->domain) == 0) {
+ if (strlen(list->domain) <= strlen(cookies[i]->domain)) {
cookies[i] = list;
- } else if (strlen(list->path) >
- strlen(cookies[i]->path) == 0) {
+ } else if (strlen(list->path) <= strlen(cookies[i]->path)) {
cookies[i] = list;
}
}
More information about the MPlayer-dev-eng
mailing list