diff options
author | mananth <mananth> | 2003-12-04 06:12:55 +0000 |
---|---|---|
committer | mananth <mananth> | 2003-12-04 06:12:55 +0000 |
commit | ca17402a6ad611da0983a1a69606c233894dcac2 (patch) | |
tree | f07168ea949df7711870be60a194fb2d637355ff | |
parent | 9da20ce9c84e0e91530afeb538e1402c5b8129e5 (diff) | |
download | sysfsutils-ca17402a6ad611da0983a1a69606c233894dcac2.tar.gz |
Corrected sysfs_get_directory_attribute()
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | lib/sysfs_dir.c | 12 |
2 files changed, 9 insertions, 6 deletions
@@ -1,4 +1,7 @@ +12/02/2003 - Ananth Mavinakayanahalli <ananth@in.ibm.com> + * Corrected sysfs_get_directory_attribute() + 12/01/2003 - Ananth Mavinakayanahalli <ananth@in.ibm.com> * Removed usage of _DIR #defines * Added functionality to obtain parent of a class device diff --git a/lib/sysfs_dir.c b/lib/sysfs_dir.c index beed52a..f3c683d 100644 --- a/lib/sysfs_dir.c +++ b/lib/sysfs_dir.c @@ -642,14 +642,14 @@ struct sysfs_attribute *sysfs_get_directory_attribute } if (dir->attributes == NULL) { - if ((sysfs_read_dir_attributes(dir)) != 0) { + if ((sysfs_read_dir_attributes(dir)) != 0) return NULL; - } - attr = (struct sysfs_attribute *)dlist_find_custom - (dir->attributes, attrname, dir_attribute_name_equal); - if (attr != NULL) - return attr; } + + attr = (struct sysfs_attribute *)dlist_find_custom + (dir->attributes, attrname, dir_attribute_name_equal); + if (attr != NULL) + return attr; if (dir->subdirs != NULL) { dlist_for_each_data(dir->subdirs, sdir, |