diff options
author | Dan McGee <dan@archlinux.org> | 2008-05-05 02:15:49 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-05-09 03:58:33 +0200 |
commit | a13bf7497948b27786a1d568264d91b8fa60491b (patch) | |
tree | 4d3a46608f22de92a92fa86ccd417694bc1907de /src/pacman/sync.c | |
parent | 5389cdf65431e6daf219b9bb8f8985c6c33b1996 (diff) | |
download | pacman-a13bf7497948b27786a1d568264d91b8fa60491b.tar.gz pacman-a13bf7497948b27786a1d568264d91b8fa60491b.tar.xz |
pacman-side code cleanups
When taking a look at PATH_MAX usage, I found a few small things we can
clean up or fix.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r-- | src/pacman/sync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 77b66da5..3c6dfd58 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -57,7 +57,7 @@ static int sync_cleandb(const char *dbpath, int keep_used) { struct stat buf; alpm_list_t *syncdbs = NULL, *i; int found = 0; - char *dname = ent->d_name; + const char *dname = ent->d_name; if(!strcmp(dname, ".") || !strcmp(dname, "..")) { continue; @@ -68,7 +68,7 @@ static int sync_cleandb(const char *dbpath, int keep_used) { } /* build the full path */ - snprintf(path, PATH_MAX, "%s%s", dbpath, ent->d_name); + snprintf(path, PATH_MAX, "%s%s", dbpath, dname); /* skip entries that are not dirs (lock file, etc.) */ stat(path, &buf); if(!S_ISDIR(buf.st_mode)) { |