summaryrefslogtreecommitdiff
path: root/libsysfs/sysfs_dir.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-04-15 16:28:56 +0200
committerGreg KH <gregkh@suse.de>2005-04-26 23:55:01 -0700
commit197178360f5c4253aeb743b32224125e58e2fd5d (patch)
treedf003d4a9dff23b2119fd7516f2dedc0ead1531c /libsysfs/sysfs_dir.c
parentd4b611430083674ee1d3aa19b87c9894ac3e39d8 (diff)
[PATCH] libsysfs: version 2.0
Diffstat (limited to 'libsysfs/sysfs_dir.c')
-rw-r--r--libsysfs/sysfs_dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libsysfs/sysfs_dir.c b/libsysfs/sysfs_dir.c
index ac3936656c..7d98c669c6 100644
--- a/libsysfs/sysfs_dir.c
+++ b/libsysfs/sysfs_dir.c
@@ -338,7 +338,7 @@ struct sysfs_attribute *get_attribute(void *dev, const char *name)
SYSFS_PATH_MAX);
safestrcatmax(path, "/", SYSFS_PATH_MAX);
safestrcatmax(path, name, SYSFS_PATH_MAX);
- if (!(sysfs_path_is_file(path)))
+ if (!sysfs_path_is_file(path))
cur = add_attribute((void *)dev, path);
return cur;
}
@@ -373,7 +373,7 @@ struct dlist *read_dir_links(const char *path)
safestrcpy(file_path, path);
safestrcat(file_path, "/");
safestrcat(file_path, dirent->d_name);
- if ((sysfs_path_is_link(file_path)) == 0) {
+ if (!sysfs_path_is_link(file_path)) {
if (!linklist) {
linklist = dlist_new_with_delete
(SYSFS_NAME_LEN, sysfs_del_name);
@@ -421,7 +421,7 @@ struct dlist *read_dir_subdirs(const char *path)
safestrcpy(file_path, path);
safestrcat(file_path, "/");
safestrcat(file_path, dirent->d_name);
- if ((sysfs_path_is_dir(file_path)) == 0) {
+ if (!sysfs_path_is_dir(file_path)) {
if (!dirlist) {
dirlist = dlist_new_with_delete
(SYSFS_NAME_LEN, sysfs_del_name);
@@ -471,7 +471,7 @@ struct dlist *get_attributes_list(void *dev)
safestrcpy(file_path, path);
safestrcat(file_path, "/");
safestrcat(file_path, dirent->d_name);
- if ((sysfs_path_is_file(file_path)) == 0) {
+ if (!sysfs_path_is_file(file_path)) {
if (((struct sysfs_device *)dev)->attrlist) {
/* check if attr is already in the list */
attr = (struct sysfs_attribute *)