From: Hannes Reinecke Date: Thu, 19 Apr 2012 09:09:01 +0000 (+0200) Subject: Remove stale variable in sysfs_attr_get_value X-Git-Tag: upstream/0.5.0~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84f22fd9d8d07425212b5a6276017e11ea592192;p=platform%2Fupstream%2Fmultipath-tools.git Remove stale variable in sysfs_attr_get_value Signed-off-by: Hannes Reinecke --- diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c index 16dce4a..13af8a1 100644 --- a/libmultipath/sysfs.c +++ b/libmultipath/sysfs.c @@ -287,7 +287,6 @@ size_t sysfs_attr_get_value(const char *devpath, const char *attr_name, char *attr_value, int attr_len) { char path_full[PATH_SIZE]; - const char *path; struct stat statbuf; int fd; ssize_t size; @@ -303,7 +302,7 @@ size_t sysfs_attr_get_value(const char *devpath, const char *attr_name, sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full)); if(sysfs_len >= sizeof(path_full)) sysfs_len = sizeof(path_full) - 1; - path = &path_full[sysfs_len]; + strlcat(path_full, devpath, sizeof(path_full)); strlcat(path_full, "/", sizeof(path_full)); strlcat(path_full, attr_name, sizeof(path_full));