From ece02b618b414244ef8247bd727e30e664249f77 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 14 Apr 2014 16:28:51 +0200 Subject: Use new path_is_url helper instead of repeated strncmp chains --- src/imlib.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/imlib.c') diff --git a/src/imlib.c b/src/imlib.c index 36de346..60cb267 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -242,11 +242,7 @@ int feh_load_image(Imlib_Image * im, feh_file * file) if (!file || !file->filename) return 0; - /* Handle URLs */ - if ((!strncmp(file->filename, "http://", 7)) - || (!strncmp(file->filename, "https://", 8)) - || (!strncmp(file->filename, "ftp://", 6)) - || (!strncmp(file->filename, "file://", 7))) { + if (path_is_url(file->filename)) { image_source = SRC_HTTP; if ((tmpname = feh_http_load_image(file->filename)) == NULL) -- cgit v1.2.3