Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.
authorMatt Kraai <kraai@debian.org>
Thu, 20 Dec 2001 23:13:26 +0000 (23:13 -0000)
committerMatt Kraai <kraai@debian.org>
Thu, 20 Dec 2001 23:13:26 +0000 (23:13 -0000)
27 files changed:
archival/bunzip2.c
archival/dpkg.c
archival/gunzip.c
archival/libunarchive/unarchive.c
archival/tar.c
coreutils/cat.c
coreutils/chgrp.c
coreutils/chmod.c
coreutils/chown.c
coreutils/ls.c
coreutils/touch.c
editors/vi.c
findutils/find.c
init/init.c
libbb/isdirectory.c
libbb/read_package_field.c
libbb/recursive_action.c
modutils/insmod.c
networking/telnet.c
procps/kill.c
shell/ash.c
shell/cmdedit.c
shell/lash.c
sysklogd/klogd.c
sysklogd/syslogd.c
util-linux/mount.c
util-linux/umount.c

index c07fe189246675d94220db9e6314ded2a5c4250d..b0a11fd83d97fc3bdaadcd79379d7234b60d5755 100644 (file)
@@ -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;
                        }
index 0ccca8f956f9c2f9abae7305cbf96c5bebcdd048..f41363d0ffb0c3d6c56003518052e5b5fcb908f8 100644 (file)
@@ -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);
index 388672541ed31324a6e0eb803616cb877d10351d..5fdb0917a8b62300e185f9f676f82edf87aa125d 100644 (file)
@@ -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);
                }
index 4a42eaf7deb44ae75d2af17c908a9d2322bc4fdd..ff9b5876fd714de419dab7046ea2e185493c1ec3 100644 (file)
@@ -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
+}
index dd65de1314173cbbc5a6d46e5b16dd1ded4ee78c..22cbf3ab2803dc21cb945135076d56803d56cb21 100644 (file)
@@ -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++;
index 820b6342e934cbd124333691bbb4ee95226383f8..33f15da71fc3314d7be667b32ca9bbf00e6c6b57 100644 (file)
@@ -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;
                }
        }
index 43ffeb7e63b92a6316739fc5f26d2a2e944374b6..968b448c0016254c6dc1bca4c17789758ee2aad6 100644 (file)
@@ -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;
                }
        }
index 53230b568833a608838f3e060db9d60200d35bd0..38b39680f4d6ce81618272ce2666d71d939dd42f 100644 (file)
@@ -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;
                }
        }
index c1b992c37074127c3b60762c21ee446dac97977c..846e27c20c114ba2a52070f4926428ca0c1fb55e 100644 (file)
@@ -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;
                }
        }
index 672a3bb3cd40e7a52a844b13323d5ea8e5bf7127..07e083f5a275135e461ce948ee87cb339a761e49 100644 (file)
@@ -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;
index 3e2e600f3f196b1a20b3111a27d2dd66f19f5aaf..f1c6dc4849fd8780a45e3cd70111bea2a6b41444 100644 (file)
@@ -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;
index 852e16340444b617e3d6dcf65af50ffaf551f166..a187c6dd035a86ca6b181ac138a5aee9d6648e5b 100644 (file)
@@ -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);
 
index 262213e8bb05aa9f74583f0d8e42693f517966fa..0ff0893a6c2437c027c866399ea0f39a23a0d006 100644 (file)
@@ -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;
                }
        }
index f6108f1e8b34ac75780974b56796e158d7ee0981..3bb5de0f792a00af5a55dcbf7f50bad483f9b087 100644 (file)
@@ -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 */
index 3dfe10522653e868a536e5fc022e0797ba65cbaf..e8ef2df1459e11a57cd43c614ea405a3a5d80a9c 100644 (file)
@@ -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);
index ac5f80167f8c8f7be48ec546a8645adb5ffe69ad..867b198ba290e728eceb2afdecb673dca3b33989 100644 (file)
@@ -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;
index e87ab9860f08dc17c56fec4dccbdcc815ace46b3..8917f470f7daefc67f75fe23f5317e62934dfa24 100644 (file)
@@ -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)
index a0bc65121d3b04eef826d1da0ac636bd8be5d184..63500cc8f6977874828ca744ec927d55d0a5eb0e 100644 (file)
 #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)) 
index 71479fce42c0660c505abe9797dba133b51b997b..d09a9d558a5a86d17263433e085b99da8f770fce 100644 (file)
@@ -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;
                         }
index 7147b5727cb6be3d490584e36e890712a081e54d..c1e8ca2e5e876a10edfb1ca429eb64436b5e0fc8 100644 (file)
@@ -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
index 16c5ec0f2518c86e455702c54360aadd75ee6788..177ec1c26c08e149b175a69b5b4704d7881ae8b9 100644 (file)
@@ -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)
 {
index d57e4c12bb085794b002768b34d58ad519bd8a13..b908915876384e975bab371b91da0fad5d4d08c2 100644 (file)
@@ -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;
index 4155f8dd2e2a0a161b4415763a7104a6aa46da75..53377d4ed4531960b63f39a600f3edbf5c84fed6 100644 (file)
@@ -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;
index 52a815d569bb9c9a006b77b815e58714b38805a3..5eb13578bd5414a3171991392ab1782b4d22480b 100644 (file)
@@ -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");
index 625f9971599f9783b60ac884b2d9abffed19b649..6db017cd479860bf58595dc12e86a22d553bd8fd 100644 (file)
@@ -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");
index 755a3fb132784f180d9cbd93e9228978dbb89dac..ae4417cb89504adc85c39c165ba01b179c126683 100644 (file)
@@ -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;
index 99db3084cf1d15ef7394e8ff28b14da2d1a72c27..29e2e3b660415fc22895895f339cc4ae4d1a2e15 100644 (file)
@@ -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);
 }