summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai2001-12-20 23:13:26 +0000
committerMatt Kraai2001-12-20 23:13:26 +0000
commit1f0c43668ac332cbcf61cbdf71844799327cc8b9 (patch)
tree97414e991363fa613f229019d697280cae1097e0
parent31c73af656813b5cadcb1dd27adb9bbc62a98987 (diff)
downloadbusybox-1f0c43668ac332cbcf61cbdf71844799327cc8b9.zip
busybox-1f0c43668ac332cbcf61cbdf71844799327cc8b9.tar.gz
Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.
-rw-r--r--archival/bunzip2.c88
-rw-r--r--archival/dpkg.c6
-rw-r--r--archival/gunzip.c2
-rw-r--r--archival/libunarchive/unarchive.c4
-rw-r--r--archival/tar.c8
-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
-rw-r--r--editors/vi.c40
-rw-r--r--findutils/find.c8
-rw-r--r--init/init.c4
-rw-r--r--libbb/isdirectory.c2
-rw-r--r--libbb/read_package_field.c2
-rw-r--r--libbb/recursive_action.c20
-rw-r--r--modutils/insmod.c8
-rw-r--r--networking/telnet.c2
-rw-r--r--procps/kill.c2
-rw-r--r--shell/ash.c4
-rw-r--r--shell/cmdedit.c4
-rw-r--r--shell/lash.c2
-rw-r--r--sysklogd/klogd.c2
-rw-r--r--sysklogd/syslogd.c12
-rw-r--r--util-linux/mount.c32
-rw-r--r--util-linux/umount.c14
27 files changed, 144 insertions, 144 deletions
diff --git a/archival/bunzip2.c b/archival/bunzip2.c
index c07fe18..b0a11fd 100644
--- a/archival/bunzip2.c
+++ b/archival/bunzip2.c
@@ -626,7 +626,7 @@ int BZ2_decompress(DState *s)
switch (switch_val) {
case BZ_X_MAGIC_1:
s->state = BZ_X_MAGIC_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -637,7 +637,7 @@ int BZ2_decompress(DState *s)
case BZ_X_MAGIC_2:
s->state = BZ_X_MAGIC_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -648,7 +648,7 @@ int BZ2_decompress(DState *s)
case BZ_X_MAGIC_3:
s->state = BZ_X_MAGIC_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -659,7 +659,7 @@ int BZ2_decompress(DState *s)
case BZ_X_MAGIC_4:
s->state = BZ_X_MAGIC_4;
- if (get_bits(s, &s->blockSize100k, 8) == FALSE) {
+ if (! get_bits(s, &s->blockSize100k, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -687,7 +687,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BLKHDR_1:
s->state = BZ_X_BLKHDR_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -702,7 +702,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BLKHDR_2:
s->state = BZ_X_BLKHDR_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -713,7 +713,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BLKHDR_3:
s->state = BZ_X_BLKHDR_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -724,7 +724,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BLKHDR_4:
s->state = BZ_X_BLKHDR_4;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -735,7 +735,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BLKHDR_5:
s->state = BZ_X_BLKHDR_5;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -746,7 +746,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BLKHDR_6:
s->state = BZ_X_BLKHDR_6;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -763,7 +763,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BCRC_1:
s->state = BZ_X_BCRC_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -771,7 +771,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BCRC_2:
s->state = BZ_X_BCRC_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -779,7 +779,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BCRC_3:
s->state = BZ_X_BCRC_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -787,7 +787,7 @@ int BZ2_decompress(DState *s)
case BZ_X_BCRC_4:
s->state = BZ_X_BCRC_4;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -799,7 +799,7 @@ int BZ2_decompress(DState *s)
int tmp = s->blockRandomised;
const int ret = get_bits(s, &tmp, 1);
s->blockRandomised = tmp;
- if (ret == FALSE) {
+ if (! ret) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -809,7 +809,7 @@ int BZ2_decompress(DState *s)
case BZ_X_ORIGPTR_1:
s->state = BZ_X_ORIGPTR_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -817,7 +817,7 @@ int BZ2_decompress(DState *s)
case BZ_X_ORIGPTR_2:
s->state = BZ_X_ORIGPTR_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -825,7 +825,7 @@ int BZ2_decompress(DState *s)
case BZ_X_ORIGPTR_3:
s->state = BZ_X_ORIGPTR_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -844,7 +844,7 @@ int BZ2_decompress(DState *s)
case BZ_X_MAPPING_1:
for (i = 0; i < 16; i++) {
s->state = BZ_X_MAPPING_1;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -864,7 +864,7 @@ int BZ2_decompress(DState *s)
for (j = 0; j < 16; j++) {
case BZ_X_MAPPING_2:
s->state = BZ_X_MAPPING_2;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -891,7 +891,7 @@ int BZ2_decompress(DState *s)
/*--- Now the selectors ---*/
case BZ_X_SELECTOR_1:
s->state = BZ_X_SELECTOR_1;
- if (get_bits(s, &nGroups, 3) == FALSE) {
+ if (! get_bits(s, &nGroups, 3)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -902,7 +902,7 @@ int BZ2_decompress(DState *s)
case BZ_X_SELECTOR_2:
s->state = BZ_X_SELECTOR_2;
- if (get_bits(s, &nSelectors, 15) == FALSE) {
+ if (! get_bits(s, &nSelectors, 15)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -918,7 +918,7 @@ int BZ2_decompress(DState *s)
while (1) {
case BZ_X_SELECTOR_3:
s->state = BZ_X_SELECTOR_3;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -956,7 +956,7 @@ int BZ2_decompress(DState *s)
for (t = 0; t < nGroups; t++) {
case BZ_X_CODING_1:
s->state = BZ_X_CODING_1;
- if (get_bits(s, &curr, 5) == FALSE) {
+ if (! get_bits(s, &curr, 5)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -969,7 +969,7 @@ int BZ2_decompress(DState *s)
case BZ_X_CODING_2:
s->state = BZ_X_CODING_2;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -979,7 +979,7 @@ int BZ2_decompress(DState *s)
case BZ_X_CODING_3:
s->state = BZ_X_CODING_3;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1044,12 +1044,12 @@ int BZ2_decompress(DState *s)
nblock = 0;
- if (get_mtf_val_init() == FALSE) {
+ if (! get_mtf_val_init()) {
goto save_state_and_return;
}
case BZ_X_MTF_1:
s->state = BZ_X_MTF_1;
- if (get_bits(s, &zvec, zn) == FALSE) {
+ if (! get_bits(s, &zvec, zn)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1065,7 +1065,7 @@ int BZ2_decompress(DState *s)
case BZ_X_MTF_2:
s->state = BZ_X_MTF_2;
- if (get_bits(s, &zj, 1) == FALSE) {
+ if (! get_bits(s, &zj, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1094,12 +1094,12 @@ int BZ2_decompress(DState *s)
}
}
N = N * 2;
- if (get_mtf_val_init() == FALSE) {
+ if (! get_mtf_val_init()) {
goto save_state_and_return;
}
case BZ_X_MTF_3:
s->state = BZ_X_MTF_3;
- if (get_bits(s, &zvec, zn) == FALSE) {
+ if (! get_bits(s, &zvec, zn)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1115,7 +1115,7 @@ int BZ2_decompress(DState *s)
case BZ_X_MTF_4:
s->state = BZ_X_MTF_4;
- if (get_bits(s, &zj, 1) == FALSE) {
+ if (! get_bits(s, &zj, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1223,12 +1223,12 @@ int BZ2_decompress(DState *s)
}
nblock++;
- if (get_mtf_val_init() == FALSE) {
+ if (! get_mtf_val_init()) {
goto save_state_and_return;
}
case BZ_X_MTF_5:
s->state = BZ_X_MTF_5;
- if (get_bits(s, &zvec, zn) == FALSE) {
+ if (! get_bits(s, &zvec, zn)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1244,7 +1244,7 @@ int BZ2_decompress(DState *s)
case BZ_X_MTF_6:
s->state = BZ_X_MTF_6;
- if (get_bits(s, &zj, 1) == FALSE) {
+ if (! get_bits(s, &zj, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1366,7 +1366,7 @@ int BZ2_decompress(DState *s)
endhdr_2:
case BZ_X_ENDHDR_2:
s->state = BZ_X_ENDHDR_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1377,7 +1377,7 @@ endhdr_2:
case BZ_X_ENDHDR_3:
s->state = BZ_X_ENDHDR_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1388,7 +1388,7 @@ endhdr_2:
case BZ_X_ENDHDR_4:
s->state = BZ_X_ENDHDR_4;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1399,7 +1399,7 @@ endhdr_2:
case BZ_X_ENDHDR_5:
s->state = BZ_X_ENDHDR_5;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1410,7 +1410,7 @@ endhdr_2:
case BZ_X_ENDHDR_6:
s->state = BZ_X_ENDHDR_6;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1422,14 +1422,14 @@ endhdr_2:
case BZ_X_CCRC_1:
s->state = BZ_X_CCRC_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((unsigned int)uc);
case BZ_X_CCRC_2:
s->state = BZ_X_CCRC_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1437,7 +1437,7 @@ endhdr_2:
case BZ_X_CCRC_3:
s->state = BZ_X_CCRC_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
@@ -1445,7 +1445,7 @@ endhdr_2:
case BZ_X_CCRC_4:
s->state = BZ_X_CCRC_4;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 0ccca8f..f41363d 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -858,7 +858,7 @@ void write_status_file(deb_file_t **deb_file)
}
}
/* If the package from the status file wasnt handle above, do it now*/
- if (write_flag == FALSE) {
+ if (! write_flag) {
fprintf(new_status_file, "%s\n\n", control_buffer);
}
@@ -1206,7 +1206,7 @@ void remove_package(const unsigned int package_num)
exclude_files = create_list(conffile_name);
/* Some directories cant be removed straight away, so do multiple passes */
- while (remove_file_array(remove_files, exclude_files) == TRUE);
+ while (remove_file_array(remove_files, exclude_files));
/* Create a list of all /var/lib/dpkg/info/<package> files */
remove_files = xmalloc(sizeof(char *) * 11);
@@ -1250,7 +1250,7 @@ void purge_package(const unsigned int package_num)
exclude_files[0] = NULL;
/* Some directories cant be removed straight away, so do multiple passes */
- while (remove_file_array(remove_files, exclude_files) == TRUE);
+ while (remove_file_array(remove_files, exclude_files));
/* Create a list of all /var/lib/dpkg/info/<package> files */
remove_files = xmalloc(sizeof(char *) * 11);
diff --git a/archival/gunzip.c b/archival/gunzip.c
index 3886725..5fdb091 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -171,7 +171,7 @@ extern int gunzip_main(int argc, char **argv)
fclose(out_file);
fclose(in_file);
- if (delete_old_file == TRUE) {
+ if (delete_old_file) {
if (unlink(delete_file_name) < 0) {
error_msg_and_die("Couldnt remove %s", delete_file_name);
}
diff --git a/archival/libunarchive/unarchive.c b/archival/libunarchive/unarchive.c
index 4a42eaf..ff9b587 100644
--- a/archival/libunarchive/unarchive.c
+++ b/archival/libunarchive/unarchive.c
@@ -227,7 +227,7 @@ char *unarchive(FILE *src_stream, FILE *out_stream, file_header_t *(*get_headers
}
}
- if (extract_flag == TRUE) {
+ if (extract_flag) {
buffer = extract_archive(src_stream, out_stream, file_entry, extract_function, prefix);
} else {
/* seek past the data entry */
@@ -238,4 +238,4 @@ char *unarchive(FILE *src_stream, FILE *out_stream, file_header_t *(*get_headers
free(file_entry);
}
return(buffer);
-} \ No newline at end of file
+}
diff --git a/archival/tar.c b/archival/tar.c
index dd65de1..22cbf3a 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -476,9 +476,9 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
/* Read the directory/files and iterate over them one at a time */
while (*argv != NULL) {
- if (recursive_action(*argv++, TRUE, FALSE, FALSE,
+ if (! recursive_action(*argv++, TRUE, FALSE, FALSE,
writeFileToTarball, writeFileToTarball,
- (void*) &tbInfo) == FALSE) {
+ (void*) &tbInfo)) {
errorFlag = TRUE;
}
}
@@ -494,7 +494,7 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
/* Hang up the tools, close up shop, head home */
close(tarFd);
- if (errorFlag == TRUE) {
+ if (errorFlag) {
error_msg("Error exit delayed from previous errors");
freeHardLinkInfo(&tbInfo.hlInfoHead);
return(FALSE);
@@ -556,7 +556,7 @@ char **list_and_not_list(char **include_list, char **exclude_list)
exclude_count++;
}
- if (found == FALSE) {
+ if (! found) {
new_include_list = realloc(new_include_list, sizeof(char *) * (include_count + 2));
new_include_list[new_include_count] = include_list[include_count];
new_include_count++;
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;
diff --git a/editors/vi.c b/editors/vi.c
index 852e163..a187c6d 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -19,7 +19,7 @@
*/
static const char vi_Version[] =
- "$Id: vi.c,v 1.19 2001/11/17 07:14:06 andersen Exp $";
+ "$Id: vi.c,v 1.20 2001/12/20 23:12:47 kraai Exp $";
/*
* To compile for standalone use:
@@ -1219,7 +1219,7 @@ key_cmd_mode:
break;
if (strncasecmp((char *) p, "quit", cnt) == 0 ||
strncasecmp((char *) p, "q!", cnt) == 0) { // delete lines
- if (file_modified == TRUE && p[1] != '!') {
+ if (file_modified && p[1] != '!') {
psbs("No write since last change (:quit! overrides)");
} else {
editing = 0;
@@ -1410,10 +1410,10 @@ key_cmd_mode:
indicate_error(c);
break;
}
- if (file_modified == TRUE
+ if (file_modified
#ifdef CONFIG_FEATURE_VI_READONLY
- && vi_readonly == FALSE
- && readonly == FALSE
+ && ! vi_readonly
+ && ! readonly
#endif /* CONFIG_FEATURE_VI_READONLY */
) {
cnt = file_write(cfn, text, end - 1);
@@ -1829,7 +1829,7 @@ static void colon(Byte * buf)
int sr;
sr= 0;
// don't edit, if the current file has been modified
- if (file_modified == TRUE && useforce != TRUE) {
+ if (file_modified && ! useforce) {
psbs("No write since last change (:edit! overrides)");
goto vc1;
}
@@ -1908,7 +1908,7 @@ static void colon(Byte * buf)
" %dL, %dC", cfn,
(sr < 0 ? " [New file]" : ""),
#ifdef CONFIG_FEATURE_VI_READONLY
- ((vi_readonly == TRUE || readonly == TRUE) ? " [Read only]" : ""),
+ ((vi_readonly || readonly) ? " [Read only]" : ""),
#endif /* CONFIG_FEATURE_VI_READONLY */
li, ch);
} else if (strncasecmp((char *) cmd, "file", i) == 0) { // what File is this
@@ -1961,7 +1961,7 @@ static void colon(Byte * buf)
Hit_Return();
} else if ((strncasecmp((char *) cmd, "quit", i) == 0) || // Quit
(strncasecmp((char *) cmd, "next", i) == 0)) { // edit next file
- if (useforce == TRUE) {
+ if (useforce) {
// force end of argv list
if (*cmd == 'q') {
optind = save_argc;
@@ -1970,7 +1970,7 @@ static void colon(Byte * buf)
goto vc1;
}
// don't exit if the file been modified
- if (file_modified == TRUE) {
+ if (file_modified) {
psbs("No write since last change (:%s! overrides)",
(*cmd == 'q' ? "quit" : "next"));
goto vc1;
@@ -2014,7 +2014,7 @@ static void colon(Byte * buf)
#endif /* CONFIG_FEATURE_VI_READONLY */
" %dL, %dC", fn,
#ifdef CONFIG_FEATURE_VI_READONLY
- ((vi_readonly == TRUE || readonly == TRUE) ? " [Read only]" : ""),
+ ((vi_readonly || readonly) ? " [Read only]" : ""),
#endif /* CONFIG_FEATURE_VI_READONLY */
li, ch);
if (ch > 0) {
@@ -2024,7 +2024,7 @@ static void colon(Byte * buf)
file_modified = TRUE;
}
} else if (strncasecmp((char *) cmd, "rewind", i) == 0) { // rewind cmd line args
- if (file_modified == TRUE && useforce != TRUE) {
+ if (file_modified && ! useforce) {
psbs("No write since last change (:rewind! overrides)");
} else {
// reset the filenames to edit
@@ -2140,7 +2140,7 @@ static void colon(Byte * buf)
fn = args;
}
#ifdef CONFIG_FEATURE_VI_READONLY
- if ((vi_readonly == TRUE || readonly == TRUE) && useforce == FALSE) {
+ if ((vi_readonly || readonly) && ! useforce) {
psbs("\"%s\" File is read only", fn);
goto vc3;
}
@@ -2149,14 +2149,14 @@ static void colon(Byte * buf)
li = count_lines(q, r);
ch = r - q + 1;
// see if file exists- if not, its just a new file request
- if (useforce == TRUE) {
+ if (useforce) {
// if "fn" is not write-able, chmod u+w
// sprintf(syscmd, "chmod u+w %s", fn);
// system(syscmd);
forced = TRUE;
}
l = file_write(fn, q, r);
- if (useforce == TRUE && forced == TRUE) {
+ if (useforce && forced) {
// chmod u-w
// sprintf(syscmd, "chmod u-w %s", fn);
// system(syscmd);
@@ -3527,7 +3527,7 @@ static int file_insert(Byte * fn, Byte * p, int size)
// see if we can open the file
#ifdef CONFIG_FEATURE_VI_READONLY
- if (vi_readonly == TRUE) goto fi1; // do not try write-mode
+ if (vi_readonly) goto fi1; // do not try write-mode
#endif
fd = open((char *) fn, O_RDWR); // assume read & write
if (fd < 0) {
@@ -3623,7 +3623,7 @@ static void place_cursor(int row, int col, int opti)
//----- 1. Try the standard terminal ESC sequence
sprintf((char *) cm1, CMrc, row + 1, col + 1);
cm= cm1;
- if (opti == FALSE) goto pc0;
+ if (! opti) goto pc0;
#ifdef CONFIG_FEATURE_VI_OPTIMIZE_CURSOR
//----- find the minimum # of chars to move cursor -------------
@@ -3798,9 +3798,9 @@ static void edit_status(void) // show file status on status line
"%s line %d of %d --%d%%--",
(cfn != 0 ? (char *) cfn : "No file"),
#ifdef CONFIG_FEATURE_VI_READONLY
- ((vi_readonly == TRUE || readonly == TRUE) ? " [Read only]" : ""),
+ ((vi_readonly || readonly) ? " [Read only]" : ""),
#endif /* CONFIG_FEATURE_VI_READONLY */
- (file_modified == TRUE ? " [modified]" : ""),
+ (file_modified ? " [modified]" : ""),
cur, tot, percent);
}
@@ -3888,7 +3888,7 @@ static void refresh(int full_screen)
cs= 0;
ce= columns-1;
sp = &screen[li * columns]; // start of screen line
- if (full_screen == TRUE) {
+ if (full_screen) {
// force re-draw of every single column from 0 - columns-1
goto re0;
}
@@ -3921,7 +3921,7 @@ static void refresh(int full_screen)
if (ce > columns-1) ce= columns-1;
if (cs > ce) { cs= 0; ce= columns-1; }
// is there a change between vitual screen and buf
- if (changed == TRUE) {
+ if (changed) {
// copy changed part of buffer to virtual screen
memmove(sp+cs, buf+(cs+offset), ce-cs+1);
diff --git a/findutils/find.c b/findutils/find.c
index 262213e..0ff0893 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -185,13 +185,13 @@ int find_main(int argc, char **argv)
}
if (firstopt == 1) {
- if (recursive_action(".", TRUE, dereference, FALSE, fileAction,
- fileAction, NULL) == FALSE)
+ if (! recursive_action(".", TRUE, dereference, FALSE, fileAction,
+ fileAction, NULL))
status = EXIT_FAILURE;
} else {
for (i = 1; i < firstopt; i++) {
- if (recursive_action(argv[i], TRUE, dereference, FALSE, fileAction,
- fileAction, NULL) == FALSE)
+ if (! recursive_action(argv[i], TRUE, dereference, FALSE, fileAction,
+ fileAction, NULL))
status = EXIT_FAILURE;
}
}
diff --git a/init/init.c b/init/init.c
index f6108f1..3bb5de0 100644
--- a/init/init.c
+++ b/init/init.c
@@ -547,7 +547,7 @@ static pid_t run(char *command, char *terminal, int get_enter)
}
}
- if (get_enter == TRUE) {
+ if (get_enter) {
/*
* Save memory by not exec-ing anything large (like a shell)
* before the user wants it. This is critical if swap is not
@@ -942,7 +942,7 @@ static void parse_inittab(void)
}
a++;
}
- if (foundIt == TRUE)
+ if (foundIt)
continue;
else {
/* Choke on an unknown action */
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)
diff --git a/modutils/insmod.c b/modutils/insmod.c
index a0bc651..63500cc 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -133,7 +133,7 @@
#ifndef MODUTILS_MODULE_H
static const int MODUTILS_MODULE_H = 1;
-#ident "$Id: insmod.c,v 1.76 2001/12/14 16:08:17 kraai Exp $"
+#ident "$Id: insmod.c,v 1.77 2001/12/20 23:13:08 kraai Exp $"
/* This file contains the structures used by the 2.0 and 2.1 kernels.
We do not use the kernel headers directly because we do not wish
@@ -350,7 +350,7 @@ int delete_module(const char *);
#ifndef MODUTILS_OBJ_H
static const int MODUTILS_OBJ_H = 1;
-#ident "$Id: insmod.c,v 1.76 2001/12/14 16:08:17 kraai Exp $"
+#ident "$Id: insmod.c,v 1.77 2001/12/20 23:13:08 kraai Exp $"
/* The relocatable object is manipulated using elfin types. */
@@ -3314,8 +3314,8 @@ extern int insmod_main( int argc, char **argv)
strcpy(module_dir, _PATH_MODULES);
/* No module found under /lib/modules/`uname -r`, this
* time cast the net a bit wider. Search /lib/modules/ */
- if (recursive_action(module_dir, TRUE, FALSE, FALSE,
- check_module_name_match, 0, m_fullName) == FALSE)
+ if (! recursive_action(module_dir, TRUE, FALSE, FALSE,
+ check_module_name_match, 0, m_fullName))
{
if (m_filename[0] == '\0'
|| ((fp = fopen(m_filename, "r")) == NULL))
diff --git a/networking/telnet.c b/networking/telnet.c
index 71479fc..d09a9d5 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -278,7 +278,7 @@ static void handlenetinput(int len)
break;
case TS_SUB1: /* Subnegotiation */
case TS_SUB2: /* Subnegotiation */
- if (subneg(c) == TRUE)
+ if (subneg(c))
G.telstate = TS_0;
break;
}
diff --git a/procps/kill.c b/procps/kill.c
index 7147b57..c1e8ca2 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -133,7 +133,7 @@ extern int kill_main(int argc, char **argv)
* upon exit, so we can save a byte or two */
argv++;
}
- if (all_found == FALSE)
+ if (! all_found)
return EXIT_FAILURE;
}
#endif
diff --git a/shell/ash.c b/shell/ash.c
index 16c5ec0..177ec1c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -8172,7 +8172,7 @@ umaskcmd(int argc, char **argv)
umask(mask);
} else {
mask = ~mask & 0777;
- if (parse_mode(ap, &mask) == FALSE) {
+ if (! parse_mode(ap, &mask)) {
error("Illegal mode: %s", ap);
}
umask(~mask & 0777);
@@ -12481,7 +12481,7 @@ findvar(struct var **vpp, const char *name)
/*
* Copyright (c) 1999 Herbert Xu <herbert@debian.org>
* This file contains code for the times builtin.
- * $Id: ash.c,v 1.37 2001/12/06 03:37:38 aaronl Exp $
+ * $Id: ash.c,v 1.38 2001/12/20 23:13:19 kraai Exp $
*/
static int timescmd (int argc, char **argv)
{
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index d57e4c1..b908915 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -769,7 +769,7 @@ static char **exe_n_cwd_tab_completion(char *command, int *num_matches,
goto cont;
str_found = add_quote_for_spec_chars(found);
if (type == FIND_FILE_ONLY ||
- (type == FIND_EXE_ONLY && is_execute(&st) == TRUE))
+ (type == FIND_EXE_ONLY && is_execute(&st)))
strcat(str_found, " ");
}
/* Add it to the list */
@@ -980,7 +980,7 @@ static void input_tab(int *lastWasTab)
}
return;
}
- if (*lastWasTab == FALSE) {
+ if (! *lastWasTab) {
char *tmp;
int len_found;
diff --git a/shell/lash.c b/shell/lash.c
index 4155f8d..53377d4 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -1437,7 +1437,7 @@ static int busy_loop(FILE * input)
next_command = command;
}
- if (expand_arguments(next_command) == FALSE) {
+ if (! expand_arguments(next_command)) {
free(command);
command = (char *) xcalloc(BUFSIZ, sizeof(char));
next_command = NULL;
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c
index 52a815d..5eb1357 100644
--- a/sysklogd/klogd.c
+++ b/sysklogd/klogd.c
@@ -135,7 +135,7 @@ extern int klogd_main(int argc, char **argv)
}
}
- if (doFork == TRUE) {
+ if (doFork) {
#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
if (daemon(0, 1) < 0)
perror_msg_and_die("daemon");
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 625f997..6db017c 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -276,7 +276,7 @@ static void message (char *fmt, ...)
fl.l_len = 1;
#ifdef CONFIG_FEATURE_IPC_SYSLOG
- if ((circular_logging == TRUE) && (buf != NULL)){
+ if ((circular_logging) && (buf != NULL)){
char b[1024];
va_start (arguments, fmt);
vsprintf (b, fmt, arguments);
@@ -366,7 +366,7 @@ static const int IOV_COUNT = 2;
"%s:%d",RemoteHost,RemotePort);
}
}
- if (local_logging == TRUE)
+ if (local_logging)
#endif
/* now spew out the message to wherever it is supposed to go */
message("%s %s %s %s\n", timestamp, LocalHostName, res, msg);
@@ -519,13 +519,13 @@ static void doSyslogd (void)
FD_SET (sock_fd, &fds);
#ifdef CONFIG_FEATURE_IPC_SYSLOG
- if (circular_logging == TRUE ){
+ if (circular_logging ){
ipcsyslog_init();
}
#endif
#ifdef CONFIG_FEATURE_REMOTE_LOG
- if (doRemoteLog == TRUE){
+ if (doRemoteLog){
init_RemoteLog();
}
#endif
@@ -616,7 +616,7 @@ extern int syslogd_main(int argc, char **argv)
#ifdef CONFIG_FEATURE_REMOTE_LOG
/* If they have not specified remote logging, then log locally */
- if (doRemoteLog == FALSE)
+ if (! doRemoteLog)
local_logging = TRUE;
#endif
@@ -629,7 +629,7 @@ extern int syslogd_main(int argc, char **argv)
umask(0);
- if (doFork == TRUE) {
+ if (doFork) {
#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
if (daemon(0, 1) < 0)
perror_msg_and_die("daemon");
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 755a3fb..ae4417c 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -127,7 +127,7 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
char *lofile = NULL;
#endif
- if (fakeIt == FALSE)
+ if (! fakeIt)
{
#if defined CONFIG_FEATURE_MOUNT_LOOP
if (use_loop==TRUE) {
@@ -163,7 +163,7 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
if (status == 0 || fakeIt==TRUE) {
#if defined CONFIG_FEATURE_MTAB_SUPPORT
- if (useMtab == TRUE) {
+ if (useMtab) {
erase_mtab(specialfile); // Clean any stale entries
write_mtab(specialfile, dir, filesystemtype, flags, mtab_opts);
}
@@ -210,19 +210,19 @@ parse_mount_options(char *options, int *flags, char *strflags)
f++;
}
#if defined CONFIG_FEATURE_MOUNT_LOOP
- if (gotone == FALSE && !strcasecmp("loop", options)) { /* loop device support */
+ if (! gotone && !strcasecmp("loop", options)) { /* loop device support */
use_loop = TRUE;
gotone = TRUE;
}
#endif
- if (*strflags && strflags != '\0' && gotone == FALSE) {
+ if (*strflags && strflags != '\0' && ! gotone) {
char *temp = strflags;
temp += strlen(strflags);
*temp++ = ',';
*temp++ = '\0';
}
- if (gotone == FALSE)
+ if (! gotone)
strcat(strflags, options);
if (comma) {
*comma = ',';
@@ -261,7 +261,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
status = do_mount(blockDevice, directory, filesystemType,
flags | MS_MGC_VAL, string_flags,
useMtab, fakeIt, mtab_opts, mount_all);
- if (status == TRUE)
+ if (status)
break;
}
}
@@ -286,7 +286,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
status = do_mount(blockDevice, directory, filesystemType,
flags | MS_MGC_VAL, string_flags,
useMtab, fakeIt, mtab_opts, mount_all);
- if (status == TRUE)
+ if (status)
break;
}
}
@@ -299,8 +299,8 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
fakeIt, mtab_opts, mount_all);
}
- if (status == FALSE) {
- if (whineOnErrors == TRUE) {
+ if (! status) {
+ if (whineOnErrors) {
perror_msg("Mounting %s on %s failed", blockDevice, directory);
}
return (FALSE);
@@ -433,7 +433,7 @@ extern int mount_main(int argc, char **argv)
if (optind + 1 < argc)
directory = simplify_path(argv[optind + 1]);
- if (all == TRUE || optind + 1 == argc) {
+ if (all || optind + 1 == argc) {
struct mntent *m = NULL;
FILE *f = setmntent("/etc/fstab", "r");
fstabmount = TRUE;
@@ -442,20 +442,20 @@ extern int mount_main(int argc, char **argv)
perror_msg_and_die( "\nCannot read /etc/fstab");
while ((m = getmntent(f)) != NULL) {
- if (all == FALSE && optind + 1 == argc && (
+ if (! all && optind + 1 == argc && (
(strcmp(device, m->mnt_fsname) != 0) &&
(strcmp(device, m->mnt_dir) != 0) ) ) {
continue;
}
- if (all == TRUE && ( // If we're mounting 'all'
+ if (all && ( // If we're mounting 'all'
(strstr(m->mnt_opts, "noauto")) || // and the file system isn't noauto,
(strstr(m->mnt_type, "swap")) || // and isn't swap or nfs, then mount it
(strstr(m->mnt_type, "nfs")) ) ) {
continue;
}
- if (all == TRUE || flags == 0) { // Allow single mount to override fstab flags
+ if (all || flags == 0) { // Allow single mount to override fstab flags
flags = 0;
string_flags = string_flags_buf;
*string_flags = '\0';
@@ -483,13 +483,13 @@ singlemount:
string_flags, useMtab, fakeIt, extra_opts, TRUE, all))
rc = EXIT_FAILURE;
- if (all == FALSE)
+ if (! all)
break;
}
- if (fstabmount == TRUE)
+ if (fstabmount)
endmntent(f);
- if (all == FALSE && fstabmount == TRUE && m == NULL)
+ if (! all && fstabmount && m == NULL)
fprintf(stderr, "Can't find %s in /etc/fstab\n", device);
return rc;
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 99db308..29e2e3b 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -179,19 +179,19 @@ static int do_umount(const char *name)
status = umount(name);
#if defined CONFIG_FEATURE_MOUNT_LOOP
- if (freeLoop == TRUE && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9))
+ if (freeLoop && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9))
/* this was a loop device, delete it */
del_loop(blockDevice);
#endif
#if defined CONFIG_FEATURE_MOUNT_FORCE
- if (status != 0 && doForce == TRUE) {
+ if (status != 0 && doForce) {
status = umount2(blockDevice, MNT_FORCE);
if (status != 0) {
error_msg_and_die("forced umount of %s failed!", blockDevice);
}
}
#endif
- if (status != 0 && doRemount == TRUE && errno == EBUSY) {
+ if (status != 0 && doRemount && errno == EBUSY) {
status = mount(blockDevice, name, NULL,
MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL);
if (status == 0) {
@@ -202,7 +202,7 @@ static int do_umount(const char *name)
}
if (status == 0) {
#if defined CONFIG_FEATURE_MTAB_SUPPORT
- if (useMtab == TRUE)
+ if (useMtab)
erase_mtab(name);
#endif
return (TRUE);
@@ -282,15 +282,15 @@ extern int umount_main(int argc, char **argv)
}
mtab_read();
- if (umountAll == TRUE) {
- if (umount_all() == TRUE)
+ if (umountAll) {
+ if (umount_all())
return EXIT_SUCCESS;
else
return EXIT_FAILURE;
}
if (realpath(*argv, path) == NULL)
perror_msg_and_die("%s", path);
- if (do_umount(path) == TRUE)
+ if (do_umount(path))
return EXIT_SUCCESS;
perror_msg_and_die("%s", *argv);
}