summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorMatt Kraai2001-12-20 23:13:26 +0000
committerMatt Kraai2001-12-20 23:13:26 +0000
commit1f0c43668ac332cbcf61cbdf71844799327cc8b9 (patch)
tree97414e991363fa613f229019d697280cae1097e0 /libbb
parent31c73af656813b5cadcb1dd27adb9bbc62a98987 (diff)
downloadbusybox-1f0c43668ac332cbcf61cbdf71844799327cc8b9.zip
busybox-1f0c43668ac332cbcf61cbdf71844799327cc8b9.tar.gz
Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/isdirectory.c2
-rw-r--r--libbb/read_package_field.c2
-rw-r--r--libbb/recursive_action.c20
3 files changed, 12 insertions, 12 deletions
diff --git a/libbb/isdirectory.c b/libbb/isdirectory.c
index 3dfe105..e8ef2df 100644
--- a/libbb/isdirectory.c
+++ b/libbb/isdirectory.c
@@ -39,7 +39,7 @@ int is_directory(const char *fileName, const int followLinks, struct stat *statB
++didMalloc;
}
- if (followLinks == TRUE)
+ if (followLinks)
status = stat(fileName, statBuf);
else
status = lstat(fileName, statBuf);
diff --git a/libbb/read_package_field.c b/libbb/read_package_field.c
index ac5f801..867b198 100644
--- a/libbb/read_package_field.c
+++ b/libbb/read_package_field.c
@@ -77,7 +77,7 @@ int read_package_field(const char *package_buffer, char **field_name, char **fie
}
break;
}
- if (exit_flag == TRUE) {
+ if (exit_flag) {
/* Check that the names are valid */
offset_value_end = offset;
name_length = offset_name_end - offset_name_start;
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c
index e87ab98..8917f47 100644
--- a/libbb/recursive_action.c
+++ b/libbb/recursive_action.c
@@ -53,7 +53,7 @@ int recursive_action(const char *fileName,
struct stat statbuf;
struct dirent *next;
- if (followLinks == TRUE)
+ if (followLinks)
status = stat(fileName, &statbuf);
else
status = lstat(fileName, &statbuf);
@@ -68,14 +68,14 @@ int recursive_action(const char *fileName,
return FALSE;
}
- if ((followLinks == FALSE) && (S_ISLNK(statbuf.st_mode))) {
+ if (! followLinks && (S_ISLNK(statbuf.st_mode))) {
if (fileAction == NULL)
return TRUE;
else
return fileAction(fileName, &statbuf, userData);
}
- if (recurse == FALSE) {
+ if (! recurse) {
if (S_ISDIR(statbuf.st_mode)) {
if (dirAction != NULL)
return (dirAction(fileName, &statbuf, userData));
@@ -87,9 +87,9 @@ int recursive_action(const char *fileName,
if (S_ISDIR(statbuf.st_mode)) {
DIR *dir;
- if (dirAction != NULL && depthFirst == FALSE) {
+ if (dirAction != NULL && ! depthFirst) {
status = dirAction(fileName, &statbuf, userData);
- if (status == FALSE) {
+ if (! status) {
perror_msg("%s", fileName);
return FALSE;
} else if (status == SKIP)
@@ -109,20 +109,20 @@ int recursive_action(const char *fileName,
continue;
}
nextFile = concat_path_file(fileName, next->d_name);
- if (recursive_action(nextFile, TRUE, followLinks, depthFirst,
- fileAction, dirAction, userData) == FALSE) {
+ if (! recursive_action(nextFile, TRUE, followLinks, depthFirst,
+ fileAction, dirAction, userData)) {
status = FALSE;
}
free(nextFile);
}
closedir(dir);
- if (dirAction != NULL && depthFirst == TRUE) {
- if (dirAction(fileName, &statbuf, userData) == FALSE) {
+ if (dirAction != NULL && depthFirst) {
+ if (! dirAction(fileName, &statbuf, userData)) {
perror_msg("%s", fileName);
return FALSE;
}
}
- if (status == FALSE)
+ if (! status)
return FALSE;
} else {
if (fileAction == NULL)