From 4b78852f7e78ec605be0a382ddc78afe33251d78 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 11 Apr 2009 14:13:03 -0500 Subject: [PATCH] const-ify endswith() Signed-off-by: Dan McGee --- lib/libalpm/sync.c | 6 +++--- 1 file 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.