[epiphany] permissions-manager: simplify security origin comparision a bit
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] permissions-manager: simplify security origin comparision a bit
- Date: Tue, 31 Jan 2017 01:53:30 +0000 (UTC)
commit 6ae35f72fc9a0084578e6a11cc3bb3544b74e8a1
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Jan 30 19:52:12 2017 -0600
permissions-manager: simplify security origin comparision a bit
It's a linear search, so exact values don't matter.
lib/ephy-permissions-manager.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/ephy-permissions-manager.c b/lib/ephy-permissions-manager.c
index c2a74c1..f653988 100644
--- a/lib/ephy-permissions-manager.c
+++ b/lib/ephy-permissions-manager.c
@@ -187,8 +187,8 @@ webkit_security_origin_compare (WebKitSecurityOrigin *a,
if (webkit_security_origin_is_opaque (b))
return 1;
- return g_strcmp0 (webkit_security_origin_get_protocol (a), webkit_security_origin_get_protocol (b)) * 100
||
- g_strcmp0 (webkit_security_origin_get_host (a), webkit_security_origin_get_host (b)) * 10 ||
+ return g_strcmp0 (webkit_security_origin_get_protocol (a), webkit_security_origin_get_protocol (b)) ||
+ g_strcmp0 (webkit_security_origin_get_host (a), webkit_security_origin_get_host (b)) ||
webkit_security_origin_get_port (b) - webkit_security_origin_get_port (a);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]