From 1a4b1f98708b5740c513f70c44b8d538423f7fb4 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Thu, 11 Jul 2013 11:57:28 -0400 Subject: Remove unnecessary check of domain in https wl. Spotted by dhill. --- whitelist.c | 11 ++++------- 1 file 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) -- cgit 1.4.1-2-gfad0