- remove superfluous C statements ";;" in decompress_unzip.c, dpkg_deb.c ifconfig.c
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 7 Oct 2005 11:34:50 +0000 (11:34 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 7 Oct 2005 11:34:50 +0000 (11:34 -0000)
- gzip.c: see if O_NOFOLLOW is defined before using it, else take alternate path
closes bug #221 (partially; The rest will follow later).

archival/dpkg_deb.c
archival/gzip.c
archival/libunarchive/decompress_unzip.c
networking/ifconfig.c

index 1e8bd8ad270f193e6be79aa45318bf1e7a4b3911..1ceaa60e06ac72e54c60ad9f846b2db3ec52fb72 100644 (file)
@@ -75,7 +75,7 @@ extern int dpkg_deb_main(int argc, char **argv)
                 * it should accept a second argument which specifies a
                 * specific field to print */
                ar_archive->accept = control_tar_llist;
-               tar_archive->accept = llist_add_to(NULL, "./control");;
+               tar_archive->accept = llist_add_to(NULL, "./control");
                tar_archive->filter = filter_accept_list;
                tar_archive->action_data = data_extract_to_stdout;
        }
index 6cf4b395ef9709b2d4a6e97921ad461ab3aac9c1..a527f0e40f8f87a307dcb820b90c27177d645279 100644 (file)
@@ -1270,7 +1270,7 @@ int gzip_main(int argc, char **argv)
                                        strcat(path, ".gz");
 
                                        /* Open output file */
-#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1)
+#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) && defined O_NOFOLLOW
                                        outFileNum =
                                                open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW);
 #else
index 9e327606ee0eeece18badf68c33ceb70719458d7..e8767cef53a244e8cf79ba2c6dfe0a21685c3623 100644 (file)
@@ -442,7 +442,7 @@ static int inflate_codes(huft_t * my_tl, huft_t * my_td, const unsigned int my_b
                if ((e = (t = tl + ((unsigned) b & ml))->e) > 16)
                        do {
                                if (e == 99) {
-                                       bb_error_msg_and_die("inflate_codes error 1");;
+                                       bb_error_msg_and_die("inflate_codes error 1");
                                }
                                b >>= t->b;
                                k -= t->b;
@@ -478,7 +478,7 @@ static int inflate_codes(huft_t * my_tl, huft_t * my_td, const unsigned int my_b
                        if ((e = (t = td + ((unsigned) b & md))->e) > 16)
                                do {
                                        if (e == 99)
-                                               bb_error_msg_and_die("inflate_codes error 2");;
+                                               bb_error_msg_and_die("inflate_codes error 2");
                                        b >>= t->b;
                                        k -= t->b;
                                        e -= 16;
index b121eb9f3cdcf9f79ecc711fd618c1fbde5df889..eddf052e0c8d88b4a955d5ce80ace0b4526f2e21 100644 (file)
@@ -353,7 +353,7 @@ int ifconfig_main(int argc, char **argv)
                for (op = OptArray; op->name; op++) {   /* Find table entry. */
                        if (strcmp(p, op->name) == 0) { /* If name matches... */
                                if ((mask &= op->flags)) {      /* set the mask and go. */
-                                       goto FOUND_ARG;;
+                                       goto FOUND_ARG;
                                }
                                /* If we get here, there was a valid arg with an */
                                /* invalid '-' prefix. */