From e826c143d3e9d21485f72c5490b2a907c936024e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 9 Jun 2011 13:41:08 -0500 Subject: 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 --- lib/libalpm/remove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/remove.c') 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); -- cgit v1.2.3-54-g00ecf