kill superfluous returns at the end of void functions
authorDenis Vlasenko <vda.linux@googlemail.com>
Sun, 11 Mar 2007 13:43:10 +0000 (13:43 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sun, 11 Mar 2007 13:43:10 +0000 (13:43 -0000)
18 files changed:
applets/applets.c
archival/dpkg.c
archival/libunarchive/data_align.c
archival/tar.c
e2fsprogs/old_e2fsprogs/blkid/devname.c
e2fsprogs/old_e2fsprogs/blkid/devno.c
e2fsprogs/old_e2fsprogs/blkid/read.c
e2fsprogs/old_e2fsprogs/e2fsck.c
e2fsprogs/old_e2fsprogs/ext2fs/bitmaps.c
e2fsprogs/old_e2fsprogs/ext2fs/inode.c
e2fsprogs/old_e2fsprogs/fsck.c
e2fsprogs/old_e2fsprogs/mke2fs.c
e2fsprogs/old_e2fsprogs/tune2fs.c
e2fsprogs/old_e2fsprogs/uuid/gen_uuid.c
editors/vi.c
miscutils/devfsd.c
networking/telnet.c
runit/runit_lib.c

index 557e9e5d81516252cea8b44e1744149de868ba9c..7245ecedcbfe94ea0c626fa96a8a0abdfb6b13b9 100644 (file)
@@ -321,7 +321,6 @@ static void parse_config_file(void)
                free(sct_head);
                sct_head = sct;
        }
-       return;
 }
 
 #else
index c86c583ab2f498d54a98b81f132efb5eb432a18f..9f7818ccf524b170cdd844fde169079e7f2f531f 100644 (file)
@@ -706,7 +706,6 @@ static void set_status(const unsigned status_node_num, const char *new_value, co
        new_status = xasprintf("%s %s %s", name_hashtable[want], name_hashtable[flag], name_hashtable[status]);
        status_hashtable[status_node_num]->status = search_name_hashtable(new_status);
        free(new_status);
-       return;
 }
 
 static const char *describe_status(int status_num) {
@@ -763,7 +762,6 @@ static void index_status_file(const char *filename)
                free(control_buffer);
        }
        fclose(status_file);
-       return;
 }
 
 static void write_buffer_no_status(FILE *new_status_file, const char *control_buffer)
@@ -780,7 +778,6 @@ static void write_buffer_no_status(FILE *new_status_file, const char *control_bu
                        fprintf(new_status_file, "%s: %s\n", name, value);
                }
        }
-       return;
 }
 
 /* This could do with a cleanup */
@@ -1425,8 +1422,6 @@ static void init_archive_deb_control(archive_handle_t *ar_handle)
 
        /* Assign the tar handle as a subarchive of the ar handle */
        ar_handle->sub_archive = tar_handle;
-
-       return;
 }
 
 static void init_archive_deb_data(archive_handle_t *ar_handle)
@@ -1447,8 +1442,6 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
 
        /* Assign the tar handle as a subarchive of the ar handle */
        ar_handle->sub_archive = tar_handle;
-
-       return;
 }
 
 static char *deb_extract_control_file_to_buffer(archive_handle_t *ar_handle, llist_t *myaccept)
@@ -1472,7 +1465,6 @@ static void data_extract_all_prefix(archive_handle_t *archive_handle)
                archive_handle->file_header->name = xasprintf("%s%s", archive_handle->buffer, name_ptr);
                data_extract_all(archive_handle);
        }
-       return;
 }
 
 static void unpack_package(deb_file_t *deb_file)
index 81594d87c8706e3110d3b721a01ad7cc2217e27e..946c94d0d9bf6a5fa1d8ba70b86923ecd1ec9f59 100644 (file)
@@ -5,9 +5,6 @@
 
 #include <sys/types.h>
 
-#include <errno.h>
-#include <unistd.h>
-
 #include "libbb.h"
 #include "unarchive.h"
 
@@ -17,6 +14,4 @@ void data_align(archive_handle_t *archive_handle, const unsigned short boundary)
 
        archive_handle->seek(archive_handle, skip_amount);
        archive_handle->offset += skip_amount;
-
-       return;
 }
index 3ed0c3650408112c3fefcb52066fd6efc10a27a7..176a7e22da436c4e5d7c2df50a6e4e52a0bc816c 100644 (file)
@@ -134,7 +134,6 @@ static void freeHardLinkInfo(HardLinkInfo ** hlInfoHeadPtr)
                }
                *hlInfoHeadPtr = NULL;
        }
-       return;
 }
 
 /* Might be faster (and bigger) if the dev/ino were stored in numeric order;) */
index 3d11734d5b05d2ff787fddbea5eb60a799b06c2c..071aa5a12f072ed75965c4b58c9ed83b9e3c65b4 100644 (file)
@@ -131,7 +131,6 @@ set_pri:
                pri = BLKID_PRI_MD;
        if (dev)
                dev->bid_pri = pri;
-       return;
 }
 
 #define PROC_PARTITIONS "/proc/partitions"
index 13e7f1a87bec05155724ce02f267e77852f3fef6..ae326f81a03f752fd57d6a2fb65a6cf111098394 100644 (file)
@@ -122,7 +122,6 @@ static void scan_dir(char *dir_name, dev_t devno, struct dir_list **list,
                }
        }
        closedir(dir);
-       return;
 }
 
 /* Directories where we will try to search for device numbers */
index bb02a2e21be07ab56326d84d0ee8dd07db6e5c7e..276e62a701afdff5cbbb8f68a7181fcc205a9fab 100644 (file)
@@ -410,7 +410,6 @@ void blkid_read_cache(blkid_cache cache)
        return;
 errout:
        close(fd);
-       return;
 }
 
 #ifdef TEST_PROGRAM
index d506db2ac7ab370444ce69bb4f674316f2e64856..a0f691606dc592cc0aa029e413607e7829725220 100644 (file)
@@ -2286,7 +2286,6 @@ err_out:
        fix_problem(ctx, PR_0_ERR_MOVE_JOURNAL, &pctx);
        fs->super->s_state &= ~EXT2_VALID_FS;
        ext2fs_mark_super_dirty(fs);
-       return;
 }
 
 /*
@@ -7328,8 +7327,6 @@ static void fix_dotdot(e2fsck_t ctx, struct dir_info *dir, ext2_ino_t parent)
                ext2fs_unmark_valid(fs);
        }
        dir->dotdot = parent;
-
-       return;
 }
 
 /*
@@ -11969,7 +11966,6 @@ static void check_super_block(e2fsck_t ctx)
         * Move the ext3 journal file, if necessary.
         */
        e2fsck_move_ext3_journal(ctx);
-       return;
 }
 
 /*
@@ -12666,7 +12662,6 @@ static void check_mount(e2fsck_t ctx)
                printf(_("check aborted.\n"));
                exit (0);
        }
-       return;
 }
 
 static int is_on_batt(void)
index 712a4a9b1d64ba0d540c3f6005a3aedeba5b32be..637ed27af9e854d3da028aa3ca81736c6ebaaccb 100644 (file)
@@ -105,8 +105,6 @@ void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map)
 
        for (i=map->end+1, j = i - map->start; i <= map->real_end; i++, j++)
                ext2fs_set_bit(j, map->bitmap);
-
-       return;
 }
 
 errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs,
index 2ff9fe6cad1856420ff3915569e1a3485ce25ab3..5e0d081bd558cb4c1421e3ac54cb986d80064b29 100644 (file)
@@ -178,7 +178,6 @@ void ext2fs_close_inode_scan(ext2_inode_scan scan)
        ext2fs_free_mem(&scan->temp_buffer);
        scan->temp_buffer = NULL;
        ext2fs_free_mem(&scan);
-       return;
 }
 
 void ext2fs_set_inode_callback(ext2_inode_scan scan,
index ce2a9688f2cc11724f3cffbddd2e984a88733baf..6e8a63742a13e9f5f1aafd2d2f760f7c2f088edd 100644 (file)
@@ -372,7 +372,6 @@ static void free_instance(struct fsck_instance *i)
        if (i->base_device)
                free(i->base_device);
        free(i);
-       return;
 }
 
 static struct fs_info *create_fs_device(const char *device, const char *mntpnt,
index 45a67239e941cd8f3f00f3222fe3da73cb39cc37..6cdb16cae0bc8f4e7821770837ea9a251671c6a2 100644 (file)
@@ -164,7 +164,6 @@ static void set_fs_defaults(const char *fs_type,
 static void invalid_block(ext2_filsys fs EXT2FS_ATTR((unused)), blk_t blk)
 {
        bb_error_msg("Bad block %u out of range; ignored", blk);
-       return;
 }
 
 /*
index 12af006da14cc79bb7dc6685228b8dcd6df0efad..e5a93378d37e89732735b36460374e71551bf3f9 100644 (file)
@@ -340,7 +340,6 @@ static void add_journal(ext2_filsys fs)
                        fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
        }
        print_check_message(fs);
-       return;
 }
 
 /*
index 9d700a015e090f143d2f3c3717a57f9139a53f71..03a9f376a5c7d8338e016faa87ae806a2ec2d35f 100644 (file)
@@ -117,7 +117,6 @@ static void get_random_bytes(void *buf, int nbytes)
         */
        for (cp = buf, i = 0; i < nbytes; i++)
                *cp++ ^= (rand() >> 7) & 0xFF;
-       return;
 }
 
 /*
index 6898e61a421cafb4064e93caf2e0b203c8ee0c06..a66f20d39777a42c3a792591496450f85ecf652e 100644 (file)
@@ -734,7 +734,7 @@ static void colon(Byte * buf)
                free(cfn);              // free the old name
                cfn = q;                        // remember new cfn
 
        vc5:
+ vc5:
                // delete all the contents of text[]
                new_text(2 * file_size(fn));
                screenbegin = dot = end = text;
@@ -1919,7 +1919,6 @@ static void end_cmd_q(void)
        YDreg = 26;                     // go back to default Yank/Delete reg
 #endif
        adding2q = 0;
-       return;
 }
 #endif /* FEATURE_VI_DOT_CMD */
 
@@ -1994,7 +1993,6 @@ static void check_context(Byte cmd)
                        //loiter= start_loiter= now;
                }
        }
-       return;
 }
 
 static inline Byte *swap_context(Byte * p) // goto new context for '' command make this the current context
@@ -2591,8 +2589,6 @@ static void psbs(const char *format, ...)
        va_end(args);
 
        have_status_msg = 1 + sizeof(SOs) + sizeof(SOn) - 2;
-
-       return;
 }
 
 // format status buffer
@@ -2605,8 +2601,6 @@ static void psb(const char *format, ...)
        va_end(args);
 
        have_status_msg = 1;
-
-       return;
 }
 
 static void ni(Byte * s) // display messages
@@ -3929,6 +3923,5 @@ static void crash_test()
                                totalcmds, M, N, I, D, Y, P, U, end - text + 1);
                oldtim = tim;
        }
-       return;
 }
 #endif
index 96c172cb8d37ce1b3a7f599afca9b8727edaed79..0069b280e9169ec5e0607fdbc42d1f08914a4a7d 100644 (file)
@@ -583,7 +583,6 @@ read_config_file_err:
        if(optional ==  0  && errno == ENOENT)
                msg_logger_and_die(LOG_ERR, "read config file: %s: %m", path);
        }
-       return;
 }   /*  End Function read_config_file   */
 
 static void process_config_line (const char *line, unsigned long *event_mask)
@@ -969,7 +968,6 @@ static void action_copy (const struct devfsd_notify_struct *info,
        ret = copy_inode (destination, &dest_stat, new_mode, source, &source_stat);
        if (ENABLE_DEBUG && ret && (errno != EEXIST))
                debug_msg_logger(LOG_ERR, "copy_inode: %s to %s: %m", source, destination);
-       return;
 }   /*  End Function action_copy  */
 
 static void action_compat (const struct devfsd_notify_struct *info, unsigned int action)
index a2a90b8216a8e4921ec52613b73e7093726d1929..1341572732a7928b222211bef5c682050dd4bda4 100644 (file)
@@ -467,8 +467,6 @@ static void to_sga(void)
                putiac2(DO, TELOPT_SGA);
        else
                putiac2(DONT, TELOPT_SGA);
-
-       return;
 }
 
 #ifdef CONFIG_FEATURE_TELNET_TTYPE
@@ -480,8 +478,6 @@ static void to_ttype(void)
                putiac2(WILL, TELOPT_TTYPE);
        else
                putiac2(WONT, TELOPT_TTYPE);
-
-       return;
 }
 #endif
 
@@ -494,8 +490,6 @@ static void to_new_environ(void)
                putiac2(WILL, TELOPT_NEW_ENVIRON);
        else
                putiac2(WONT, TELOPT_NEW_ENVIRON);
-
-       return;
 }
 #endif
 
@@ -504,29 +498,33 @@ static void to_naws(void)
 {
        /* Tell server we will do NAWS */
        putiac2(WILL, TELOPT_NAWS);
-       return;
 }
 #endif
 
 static void telopt(byte c)
 {
-       switch (c)
-       {
-               case TELOPT_ECHO:               to_echo();      break;
-               case TELOPT_SGA:                to_sga();       break;
+       switch (c) {
+       case TELOPT_ECHO:
+               to_echo(); break;
+       case TELOPT_SGA:
+               to_sga(); break;
 #ifdef CONFIG_FEATURE_TELNET_TTYPE
-               case TELOPT_TTYPE:              to_ttype();break;
+       case TELOPT_TTYPE:
+               to_ttype(); break;
 #endif
 #ifdef CONFIG_FEATURE_TELNET_AUTOLOGIN
-               case TELOPT_NEW_ENVIRON:        to_new_environ();       break;
+       case TELOPT_NEW_ENVIRON:
+               to_new_environ(); break;
 #endif
 #ifdef CONFIG_FEATURE_AUTOWIDTH
-               case TELOPT_NAWS:               to_naws();
-                                                               putiac_naws(c, win_width, win_height);
-                                                               break;
+       case TELOPT_NAWS:
+               to_naws();
+               putiac_naws(c, win_width, win_height);
+               break;
 #endif
-               default:                                to_notsup(c);
-                                                               break;
+       default:
+               to_notsup(c);
+               break;
        }
 }
 
index 6401ba0c88f5fc6ccb7c7e13c3b4a3e0545e31a5..0830314df59638d65c085d61a6879e18625c5faf 100644 (file)
@@ -120,7 +120,6 @@ void fmt_ptime30nul(char *s, struct taia *ta) {
        /* 4+1 + 2+1 + 2+1 + 2+1 + 2+1 + 2+1 + 9 = */
        /* 5   + 3   + 3   + 3   + 3   + 3   + 9 = */
        /* 20 (up to '.' inclusive) + 9 (not including '\0') */
-       return;
 }
 
 unsigned fmt_taia25(char *s, struct taia *t) {