FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 04-19-2012, 09:09 AM
Hannes Reinecke
 
Default Remove stale variable in sysfs_attr_get_value

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/sysfs.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

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));
--
1.7.3.4

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 04-30-2012, 10:25 AM
Hannes Reinecke
 
Default Remove stale variable in sysfs_attr_get_value

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/sysfs.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

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));
--
1.7.3.4

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 10:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org