diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-12-20 23:13:26 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-12-20 23:13:26 +0000 |
commit | c3d7ff736bf14fd86f3f3f1246bc66d5e1afbc65 (patch) | |
tree | 97414e991363fa613f229019d697280cae1097e0 /libbb | |
parent | 62ecfc62e8eb535636f3c1029052f4b13b9b2183 (diff) | |
download | busybox-w32-c3d7ff736bf14fd86f3f3f1246bc66d5e1afbc65.tar.gz busybox-w32-c3d7ff736bf14fd86f3f3f1246bc66d5e1afbc65.tar.bz2 busybox-w32-c3d7ff736bf14fd86f3f3f1246bc66d5e1afbc65.zip |
Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.
git-svn-id: svn://busybox.net/trunk/busybox@3925 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/isdirectory.c | 2 | ||||
-rw-r--r-- | libbb/read_package_field.c | 2 | ||||
-rw-r--r-- | libbb/recursive_action.c | 20 |
3 files changed, 12 insertions, 12 deletions
diff --git a/libbb/isdirectory.c b/libbb/isdirectory.c index 3dfe10522..e8ef2df14 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 | |||
39 | ++didMalloc; | 39 | ++didMalloc; |
40 | } | 40 | } |
41 | 41 | ||
42 | if (followLinks == TRUE) | 42 | if (followLinks) |
43 | status = stat(fileName, statBuf); | 43 | status = stat(fileName, statBuf); |
44 | else | 44 | else |
45 | status = lstat(fileName, statBuf); | 45 | status = lstat(fileName, statBuf); |
diff --git a/libbb/read_package_field.c b/libbb/read_package_field.c index ac5f80167..867b198ba 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 | |||
77 | } | 77 | } |
78 | break; | 78 | break; |
79 | } | 79 | } |
80 | if (exit_flag == TRUE) { | 80 | if (exit_flag) { |
81 | /* Check that the names are valid */ | 81 | /* Check that the names are valid */ |
82 | offset_value_end = offset; | 82 | offset_value_end = offset; |
83 | name_length = offset_name_end - offset_name_start; | 83 | name_length = offset_name_end - offset_name_start; |
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index e87ab9860..8917f470f 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c | |||
@@ -53,7 +53,7 @@ int recursive_action(const char *fileName, | |||
53 | struct stat statbuf; | 53 | struct stat statbuf; |
54 | struct dirent *next; | 54 | struct dirent *next; |
55 | 55 | ||
56 | if (followLinks == TRUE) | 56 | if (followLinks) |
57 | status = stat(fileName, &statbuf); | 57 | status = stat(fileName, &statbuf); |
58 | else | 58 | else |
59 | status = lstat(fileName, &statbuf); | 59 | status = lstat(fileName, &statbuf); |
@@ -68,14 +68,14 @@ int recursive_action(const char *fileName, | |||
68 | return FALSE; | 68 | return FALSE; |
69 | } | 69 | } |
70 | 70 | ||
71 | if ((followLinks == FALSE) && (S_ISLNK(statbuf.st_mode))) { | 71 | if (! followLinks && (S_ISLNK(statbuf.st_mode))) { |
72 | if (fileAction == NULL) | 72 | if (fileAction == NULL) |
73 | return TRUE; | 73 | return TRUE; |
74 | else | 74 | else |
75 | return fileAction(fileName, &statbuf, userData); | 75 | return fileAction(fileName, &statbuf, userData); |
76 | } | 76 | } |
77 | 77 | ||
78 | if (recurse == FALSE) { | 78 | if (! recurse) { |
79 | if (S_ISDIR(statbuf.st_mode)) { | 79 | if (S_ISDIR(statbuf.st_mode)) { |
80 | if (dirAction != NULL) | 80 | if (dirAction != NULL) |
81 | return (dirAction(fileName, &statbuf, userData)); | 81 | return (dirAction(fileName, &statbuf, userData)); |
@@ -87,9 +87,9 @@ int recursive_action(const char *fileName, | |||
87 | if (S_ISDIR(statbuf.st_mode)) { | 87 | if (S_ISDIR(statbuf.st_mode)) { |
88 | DIR *dir; | 88 | DIR *dir; |
89 | 89 | ||
90 | if (dirAction != NULL && depthFirst == FALSE) { | 90 | if (dirAction != NULL && ! depthFirst) { |
91 | status = dirAction(fileName, &statbuf, userData); | 91 | status = dirAction(fileName, &statbuf, userData); |
92 | if (status == FALSE) { | 92 | if (! status) { |
93 | perror_msg("%s", fileName); | 93 | perror_msg("%s", fileName); |
94 | return FALSE; | 94 | return FALSE; |
95 | } else if (status == SKIP) | 95 | } else if (status == SKIP) |
@@ -109,20 +109,20 @@ int recursive_action(const char *fileName, | |||
109 | continue; | 109 | continue; |
110 | } | 110 | } |
111 | nextFile = concat_path_file(fileName, next->d_name); | 111 | nextFile = concat_path_file(fileName, next->d_name); |
112 | if (recursive_action(nextFile, TRUE, followLinks, depthFirst, | 112 | if (! recursive_action(nextFile, TRUE, followLinks, depthFirst, |
113 | fileAction, dirAction, userData) == FALSE) { | 113 | fileAction, dirAction, userData)) { |
114 | status = FALSE; | 114 | status = FALSE; |
115 | } | 115 | } |
116 | free(nextFile); | 116 | free(nextFile); |
117 | } | 117 | } |
118 | closedir(dir); | 118 | closedir(dir); |
119 | if (dirAction != NULL && depthFirst == TRUE) { | 119 | if (dirAction != NULL && depthFirst) { |
120 | if (dirAction(fileName, &statbuf, userData) == FALSE) { | 120 | if (! dirAction(fileName, &statbuf, userData)) { |
121 | perror_msg("%s", fileName); | 121 | perror_msg("%s", fileName); |
122 | return FALSE; | 122 | return FALSE; |
123 | } | 123 | } |
124 | } | 124 | } |
125 | if (status == FALSE) | 125 | if (! status) |
126 | return FALSE; | 126 | return FALSE; |
127 | } else { | 127 | } else { |
128 | if (fileAction == NULL) | 128 | if (fileAction == NULL) |