1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

const-ify endswith()

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2009-04-11 14:13:03 -05:00
parent aefb4e0fa5
commit 4b78852f7e

View File

@ -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.