summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-04-11 14:13:03 -0500
committerDan McGee <dan@archlinux.org>2009-04-11 14:13:03 -0500
commit4b78852f7e78ec605be0a382ddc78afe33251d78 (patch)
tree1cf5c7336f5b8cfc14b9550384a4565f66e75294 /lib/libalpm
parentaefb4e0fa54ad5b4140d6991f389b5a6fb4ead6d (diff)
downloadpacman-4b78852f7e78ec605be0a382ddc78afe33251d78.tar.xz
const-ify endswith()
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/sync.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 608ee4fc..85a07554 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -607,10 +607,10 @@ off_t SYMEXPORT alpm_pkg_download_size(pmpkg_t *newpkg)
return(newpkg->download_size);
}
-static int endswith(char *filename, char *extension)
+static int endswith(const char *filename, const char *extension)
{
- char *s = filename + strlen(filename) - strlen(extension);
- return (strcmp(s, extension) == 0);
+ const char *s = filename + strlen(filename) - strlen(extension);
+ return(strcmp(s, extension) == 0);
}
/** Applies delta files to create an upgraded package file.