diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-28 23:38:28 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-28 23:38:28 (EDT) |
commit | acdbbfd26edb7d7d7e5a14f3dc5aba2834cb531e (patch) | |
tree | 375149296ea677d078b617883fd0ecd9bc18d494 /src | |
parent | 99a0a6a1994381a551b5908f3772054e38560ae0 (diff) | |
download | marquee-acdbbfd26edb7d7d7e5a14f3dc5aba2834cb531e.zip marquee-acdbbfd26edb7d7d7e5a14f3dc5aba2834cb531e.tar.gz marquee-acdbbfd26edb7d7d7e5a14f3dc5aba2834cb531e.tar.bz2 |
Revert "MqWebView: Rewrite extension checking functions"
This reverts commit 99a0a6a1994381a551b5908f3772054e38560ae0.
Diffstat (limited to 'src')
-rw-r--r-- | src/web-view.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/web-view.c b/src/web-view.c index f7e410f..31540b3 100644 --- a/src/web-view.c +++ b/src/web-view.c @@ -914,31 +914,27 @@ get_clean_title(MqWebView *web_view) static gboolean extension_is_html(const gchar *extension) { - if (extension[0] == 'h' && extension[1] == 't' && extension[2] == 'm') { - if (extension[3] == '\0') { - return TRUE; - } else if (extension[3] == 'l' && extension[4] == '\0') { - return TRUE; - } - } - return FALSE; + return + extension[0] == 'h' && + extension[1] == 't' && + extension[2] == 'm' && + (extension[3] == '\0' || + (extension[3] == 'l' && + extension[4] == '\0')); } static gboolean extension_is_mhtml(const gchar *extension) { - if (extension[0] == 'm' && extension[1] == 'h' && extension[2] == 't') { - if (extension[3] == '\0') { - return TRUE; - } else if (extension[3] == 'm') { - if (extension[3] == '\0') { - return TRUE; - } else if (extension[4] == 'l' && extension[5] == '\0'){ - return TRUE; - } - } - } - return FALSE; + return + extension[0] == 'm' && + extension[1] == 'h' && + extension[2] == 't' && + (extension[3] == '\0' || + (extension[3] == 'm' && + (extension[4] == '\0' || + (extension[4] == 'l' && + extension[5] == '\0')))); } static void |