summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/server.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-24 06:33:40 +0200
committerAaron Griffin <aaron@archlinux.org>2006-10-24 06:33:40 +0200
commite21f4c8f2e7eb9f974c1bb1ecac03eb947982be6 (patch)
tree45cf49a3df121d814d86e21b38db6edce8634e8f /lib/libalpm/server.c
parent7fc4b8d2d51ba3f5503b06ee6c368ee87ca2c81d (diff)
downloadpacman-e21f4c8f2e7eb9f974c1bb1ecac03eb947982be6.tar.gz
pacman-e21f4c8f2e7eb9f974c1bb1ecac03eb947982be6.tar.xz
Added PM_DLFNM_LEN define, via VMiklos
http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=pacman;a=commitdiff;h=20061023154138-e2957-de4837230b091cbc2136306e1c55a4b79cc72fc8.gz
Diffstat (limited to 'lib/libalpm/server.c')
-rw-r--r--lib/libalpm/server.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c
index a5ae9e9f..d86002d2 100644
--- a/lib/libalpm/server.c
+++ b/lib/libalpm/server.c
@@ -299,22 +299,22 @@ int _alpm_downloadfiles_forreal(pmlist_t *servers, const char *localpath,
struct stat st;
snprintf(output, PATH_MAX, "%s/%s.part", localpath, fn);
if(pm_dlfnm) {
- strncpy(pm_dlfnm, fn, 22);
+ strncpy(pm_dlfnm, fn, PM_DLFNM_LEN);
}
/* drop filename extension */
ptr = strstr(fn, PM_EXT_DB);
- if(pm_dlfnm && ptr && (ptr-fn) < 22) {
+ if(pm_dlfnm && ptr && (ptr-fn) < PM_DLFNM_LEN) {
pm_dlfnm[ptr-fn] = '\0';
}
ptr = strstr(fn, PM_EXT_PKG);
- if(ptr && (ptr-fn) < 24) {
+ if(ptr && (ptr-fn) < PM_DLFNM_LEN) {
pm_dlfnm[ptr-fn] = '\0';
}
if(pm_dlfnm) {
- for(j = strlen(pm_dlfnm); j < 22; j++) {
+ for(j = strlen(pm_dlfnm); j < PM_DLFNM_LEN; j++) {
(pm_dlfnm)[j] = ' ';
}
- pm_dlfnm[22] = '\0';
+ pm_dlfnm[PM_DLFNM_LEN] = '\0';
}
if(pm_dloffset) {
*pm_dloffset = 0;