From b2b76e137020df45176f40f80afac433a0f368d9 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 20 Feb 2004 22:37:42 +0000 Subject: Ensure that there are no more chars after the last /. Cut down number of 2004-02-20 Marco Pesenti Gritti * src/ephy-completion-model.c: (is_base_address), (init_relevance_col): Ensure that there are no more chars after the last /. Cut down number of visists properly. --- src/ephy-completion-model.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c index 851174fc3..a3766cfcc 100644 --- a/src/ephy-completion-model.c +++ b/src/ephy-completion-model.c @@ -358,13 +358,16 @@ is_base_address (const char *address) { if (*address == '/') slashes++; - /* Base uris has 3 slashes like http://www.gnome.org/ */ - if (slashes == 4) return FALSE; - address++; + + /* Base uris has 3 slashes like http://www.gnome.org/ */ + if (slashes == 3) + { + return (*address == '\0'); + } } - return TRUE; + return FALSE; } static void @@ -389,7 +392,7 @@ init_relevance_col (GValue *value, EphyNode *node, int group) address = ephy_node_get_property_string (node, EPHY_NODE_PAGE_PROP_LOCATION); - visits = MAX (visits, (1 << 5) - 1); + visits = MIN (visits, (1 << 5) - 1); if (is_base_address (address)) { -- cgit v1.2.3