diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-09 20:41:08 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-09 21:16:55 +0200 |
commit | e826c143d3e9d21485f72c5490b2a907c936024e (patch) | |
tree | ca08e8327d7431d8ce97e6a3420def97a4f57620 /lib/libalpm/remove.c | |
parent | 9d6568da0f55fb05ea5c28e06efb51046fd270bf (diff) | |
download | pacman-e826c143d3e9d21485f72c5490b2a907c936024e.tar.gz pacman-e826c143d3e9d21485f72c5490b2a907c936024e.tar.xz |
Kill all remaining 'PATH_MAX + 1' usages
The few remaining instances were utilized for buffers in calls to
snprintf() and realpath(). Both of these functions will always ensure
the returned value is padded with '\0', so there is no need for the
extra byte.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r-- | lib/libalpm/remove.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 27305ae3..a4b60cf4 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -186,7 +186,7 @@ int _alpm_remove_prepare(pmhandle_t *handle, alpm_list_t **data) static int can_remove_file(pmhandle_t *handle, const char *path, alpm_list_t *skip) { - char file[PATH_MAX+1]; + char file[PATH_MAX]; snprintf(file, PATH_MAX, "%s%s", handle->root, path); @@ -215,7 +215,7 @@ static void unlink_file(pmhandle_t *handle, pmpkg_t *info, char *filename, alpm_list_t *skip_remove, int nosave) { struct stat buf; - char file[PATH_MAX+1]; + char file[PATH_MAX]; snprintf(file, PATH_MAX, "%s%s", handle->root, filename); |