kill superfluous returns at the end of void functions

This commit is contained in:
Denis Vlasenko 2007-03-11 13:43:10 +00:00
parent ecea8f201e
commit baca175912
18 changed files with 17 additions and 59 deletions

View File

@ -321,7 +321,6 @@ static void parse_config_file(void)
free(sct_head);
sct_head = sct;
}
return;
}
#else

View 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)

View 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;
}

View 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;) */

View File

@ -131,7 +131,6 @@ set_pri:
pri = BLKID_PRI_MD;
if (dev)
dev->bid_pri = pri;
return;
}
#define PROC_PARTITIONS "/proc/partitions"

View 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 */

View File

@ -410,7 +410,6 @@ void blkid_read_cache(blkid_cache cache)
return;
errout:
close(fd);
return;
}
#ifdef TEST_PROGRAM

View 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)

View 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,

View 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,

View 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,

View 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;
}
/*

View File

@ -340,7 +340,6 @@ static void add_journal(ext2_filsys fs)
fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
}
print_check_message(fs);
return;
}
/*

View 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;
}
/*

View 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

View 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)

View 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;
}
}

View 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) {