From 06ac97d79f4376b5ea655c4922f2e919ca9d6ff3 Mon Sep 17 00:00:00 2001 From: rathann Date: Sun, 13 Nov 2005 20:25:06 +0000 Subject: [PATCH] Simplify weird code. ;) Approved by Diego. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16984 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/cookies.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libmpdemux/cookies.c b/libmpdemux/cookies.c index 0a469c19c4..ca328f9b4b 100644 --- a/libmpdemux/cookies.c +++ b/libmpdemux/cookies.c @@ -234,11 +234,9 @@ cookies_set(HTTP_header_t * http_hdr, const char *domain, const char *url) 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; } }