summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorMatt Kraai2001-12-20 23:13:26 +0000
committerMatt Kraai2001-12-20 23:13:26 +0000
commit1f0c43668ac332cbcf61cbdf71844799327cc8b9 (patch)
tree97414e991363fa613f229019d697280cae1097e0 /coreutils
parent31c73af656813b5cadcb1dd27adb9bbc62a98987 (diff)
downloadbusybox-1f0c43668ac332cbcf61cbdf71844799327cc8b9.zip
busybox-1f0c43668ac332cbcf61cbdf71844799327cc8b9.tar.gz
Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/cat.c2
-rw-r--r--coreutils/chgrp.c4
-rw-r--r--coreutils/chmod.c6
-rw-r--r--coreutils/chown.c4
-rw-r--r--coreutils/ls.c2
-rw-r--r--coreutils/touch.c4
6 files changed, 11 insertions, 11 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 820b634..33f15da 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -37,7 +37,7 @@ extern int cat_main(int argc, char **argv)
while (--argc > 0) {
if(!(strcmp(*++argv, "-"))) {
print_file(stdin);
- } else if (print_file_by_name(*argv) == FALSE) {
+ } else if (! print_file_by_name(*argv)) {
status = EXIT_FAILURE;
}
}
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c
index 43ffeb7..968b448 100644
--- a/coreutils/chgrp.c
+++ b/coreutils/chgrp.c
@@ -72,8 +72,8 @@ int chgrp_main(int argc, char **argv)
/* Ok, ready to do the deed now */
while (++optind < argc) {
- if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
- fileAction, fileAction, NULL) == FALSE) {
+ if (! recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
+ fileAction, fileAction, NULL)) {
return EXIT_FAILURE;
}
}
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index 53230b5..38b3968 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -58,7 +58,7 @@ int chmod_main(int argc, char **argv)
if (argc > optind && argc > 2 && argv[optind]) {
/* Parse the specified mode */
mode_t mode;
- if (parse_mode(argv[optind], &mode) == FALSE) {
+ if (! parse_mode(argv[optind], &mode)) {
error_msg_and_die( "unknown mode: %s", argv[optind]);
}
} else {
@@ -67,8 +67,8 @@ int chmod_main(int argc, char **argv)
/* Ok, ready to do the deed now */
for (i = optind + 1; i < argc; i++) {
- if (recursive_action (argv[i], recursiveFlag, FALSE, FALSE, fileAction,
- fileAction, argv[optind]) == FALSE) {
+ if (! recursive_action (argv[i], recursiveFlag, FALSE, FALSE, fileAction,
+ fileAction, argv[optind])) {
return EXIT_FAILURE;
}
}
diff --git a/coreutils/chown.c b/coreutils/chown.c
index c1b992c..846e27c 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -94,8 +94,8 @@ int chown_main(int argc, char **argv)
/* Ok, ready to do the deed now */
while (++optind < argc) {
- if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
- fileAction, fileAction, NULL) == FALSE) {
+ if (! recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
+ fileAction, fileAction, NULL)) {
return EXIT_FAILURE;
}
}
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 672a3bb..07e083f 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -193,7 +193,7 @@ static unsigned long ls_disp_hr = 0;
static int my_stat(struct dnode *cur)
{
#ifdef CONFIG_FEATURE_LS_FOLLOWLINKS
- if (follow_links == TRUE) {
+ if (follow_links) {
if (stat(cur->fullname, &cur->dstat)) {
perror_msg("%s", cur->fullname);
status = EXIT_FAILURE;
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 3e2e600..f1c6dc4 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -53,10 +53,10 @@ extern int touch_main(int argc, char **argv)
}
while (argc > 0) {
- fd = open(*argv, (create == FALSE) ? O_RDWR : O_RDWR | O_CREAT,
+ fd = open(*argv, create ? O_RDWR | O_CREAT : O_RDWR,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (fd < 0) {
- if (create == FALSE && errno == ENOENT) {
+ if (! create && errno == ENOENT) {
argc--;
argv++;
continue;