diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-04-14 16:28:51 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-04-14 16:28:51 +0200 |
commit | ece02b618b414244ef8247bd727e30e664249f77 (patch) | |
tree | 1df8fda0e149afad66f131cddbbe5077589b123b /src/imlib.c | |
parent | ad285742e9f2111e4ae3d05deb41bfebbce58025 (diff) |
Use new path_is_url helper instead of repeated strncmp chains
Diffstat (limited to 'src/imlib.c')
-rw-r--r-- | src/imlib.c | 6 |
1 files changed, 1 insertions, 5 deletions
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) |