[Pkg-libvirt-commits] [libguestfs] 01/59: builder: use Filename.check_suffix
Hilko Bengen
bengen at moszumanska.debian.org
Thu Mar 20 23:05:33 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 8ba31e69dc359f2b22e47bfeb5230e72ba95699b
Author: Pino Toscano <ptoscano at redhat.com>
Date: Mon Mar 10 13:42:16 2014 +0100
builder: use Filename.check_suffix
... instead of manually extracting and checking the suffix by ourselves
---
builder/sources.ml | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/builder/sources.ml b/builder/sources.ml
index fd0b236..016adc4 100644
--- a/builder/sources.ml
+++ b/builder/sources.ml
@@ -87,10 +87,7 @@ let merge_sources current_sources new_sources =
) new_sources current_sources
let filter_filenames filename =
- let suffix = ".conf" in
- let n = String.length filename in
- let ns = String.length suffix in
- n >= ns && String.sub filename (n - ns) ns = suffix
+ Filename.check_suffix filename ".conf"
let read_sources ~prog ~debug =
let dirs = Paths.xdg_config_dirs ~prog in
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list