about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJosh Rickmar <jrick@conformal.com>2013-07-11 11:57:28 -0400
committerJosh Rickmar <jrick@conformal.com>2013-07-11 11:57:28 -0400
commit1a4b1f98708b5740c513f70c44b8d538423f7fb4 (patch)
tree264ac562b6a13a7427c8690f492d44da9474cdbd
parent8038b8be88d29af20469d8abdbea0f9b20e1cd38 (diff)
downloadxombrero-1a4b1f98708b5740c513f70c44b8d538423f7fb4.tar.gz
Remove unnecessary check of domain in https wl.
Spotted by dhill.
-rw-r--r--whitelist.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/whitelist.c b/whitelist.c
index 8f26e9c..81ea294 100644
--- a/whitelist.c
+++ b/whitelist.c
@@ -573,13 +573,10 @@ toggle_force_https(struct tab *t, struct karg *args)
 	if (es) {
 		args->i |= !XT_WL_PERSISTENT;
 		wl_add(dom, &force_https, args->i);
-	} else {
-		w = wl_find(dom, &force_https);
-		if (w != NULL) {
-			TAILQ_REMOVE(&force_https, w, entry);
-			g_free(w->re);
-			g_free(w->pat);
-		}
+	} else if (w != NULL) {
+		TAILQ_REMOVE(&force_https, w, entry);
+		g_free(w->re);
+		g_free(w->pat);
 	}
 
 	if (args->i & XT_WL_RELOAD)