diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-28 16:16:53 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-28 16:16:53 +0000 |
| commit | be278d2bb8f67e75c4bb2e5a62f217fe79dc66e3 (patch) | |
| tree | 423972d21eee308fc8e09315f029e1310bdfda69 /src | |
| parent | 72e09121b253e285f89a0e04a0d6de32b9aa3121 (diff) | |
Remove (void) args, these just make things ugly.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1811 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
52 files changed, 134 insertions, 134 deletions
diff --git a/src/base64.c b/src/base64.c index 80022607b..144c51bec 100644 --- a/src/base64.c +++ b/src/base64.c @@ -240,7 +240,7 @@ int b64_decode(const char *src, char *target, size_t targsize) case 2: /* Valid, means one byte of info */ /* Skip any number of spaces. */ - for ((void) NULL; ch != '\0'; ch = *src++) + for (; ch != '\0'; ch = *src++) if (!isspace(ch)) break; /* Make sure there is another trailing = sign. */ @@ -255,7 +255,7 @@ int b64_decode(const char *src, char *target, size_t targsize) * We know this char is an =. Is there anything but * whitespace after it? */ - for ((void) NULL; ch != '\0'; ch = *src++) + for (; ch != '\0'; ch = *src++) if (!isspace(ch)) return (-1); diff --git a/src/botserv.c b/src/botserv.c index 6b0a1bbf4..9eddfe685 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -29,11 +29,11 @@ static UserData *get_user_data(Channel * c, User * u); static void check_ban(ChannelInfo * ci, User * u, int ttbtype); static void bot_kick(ChannelInfo * ci, User * u, int message, ...); -E void moduleAddBotServCmds(void); +E void moduleAddBotServCmds(); /*************************************************************************/ /* *INDENT-OFF* */ -void moduleAddBotServCmds(void) { +void moduleAddBotServCmds() { ModuleManager::LoadModuleList(BotServCoreNumber, BotServCoreModules); } /* *INDENT-ON* */ @@ -68,7 +68,7 @@ void get_botserv_stats(long *nrec, long *memuse) /* BotServ initialization. */ -void bs_init(void) +void bs_init() { if (s_BotServ) { moduleAddBotServCmds(); @@ -442,7 +442,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf) } \ } while (0) -void load_bs_dbase(void) +void load_bs_dbase() { dbFILE *f; int c, ver; @@ -498,7 +498,7 @@ void load_bs_dbase(void) } \ } while (0) -void save_bs_dbase(void) +void save_bs_dbase() { dbFILE *f; BotInfo *bi; diff --git a/src/channels.c b/src/channels.c index 392e155f5..f04b301b0 100644 --- a/src/channels.c +++ b/src/channels.c @@ -393,7 +393,7 @@ Channel *findchan(const char *chan) static Channel *current; static int next_index; -Channel *firstchan(void) +Channel *firstchan() { next_index = 0; while (next_index < 1024 && current == NULL) @@ -404,7 +404,7 @@ Channel *firstchan(void) return current; } -Channel *nextchan(void) +Channel *nextchan() { if (current) current = current->next; @@ -1908,7 +1908,7 @@ void do_mass_mode(char *modes) /*************************************************************************/ -void restore_unsynced_topics(void) +void restore_unsynced_topics() { Channel *c; diff --git a/src/chanserv.c b/src/chanserv.c index 2f748cdd2..d8039eab3 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -118,7 +118,7 @@ CSModeUtil csmodeutils[] = { /*************************************************************************/ -void moduleAddChanServCmds(void) { +void moduleAddChanServCmds() { ModuleManager::LoadModuleList(ChanServCoreNumber, ChanServCoreModules); } @@ -255,7 +255,7 @@ void get_chanserv_stats(long *nrec, long *memuse) /* ChanServ initialization. */ -void cs_init(void) +void cs_init() { moduleAddChanServCmds(); } @@ -296,7 +296,7 @@ void chanserv(User * u, char *buf) } \ } while (0) -void load_cs_dbase(void) +void load_cs_dbase() { dbFILE *f; int ver, i, j, c; @@ -575,7 +575,7 @@ void load_cs_dbase(void) } \ } while (0) -void save_cs_dbase(void) +void save_cs_dbase() { dbFILE *f; int i, j; diff --git a/src/core/bs_fantasy.c b/src/core/bs_fantasy.c index 2885db065..80d07d993 100644 --- a/src/core/bs_fantasy.c +++ b/src/core/bs_fantasy.c @@ -35,7 +35,7 @@ class BSFantasy : public Module /** * Unload the module **/ -void AnopeFini(void) +void AnopeFini() { } diff --git a/src/core/bs_fantasy_seen.c b/src/core/bs_fantasy_seen.c index 0a9236aa0..9636d9d7a 100644 --- a/src/core/bs_fantasy_seen.c +++ b/src/core/bs_fantasy_seen.c @@ -36,7 +36,7 @@ class BSFantasySeen : public Module /** * Unload the module **/ -void AnopeFini(void) +void AnopeFini() { } diff --git a/src/core/ms_rsend.c b/src/core/ms_rsend.c index 798727e89..2c630e63f 100644 --- a/src/core/ms_rsend.c +++ b/src/core/ms_rsend.c @@ -40,7 +40,7 @@ class MSRSend : public Module /** * Unload the module **/ -void AnopeFini(void) +void AnopeFini() { } diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c index e3fc11c7a..cd15e2a88 100644 --- a/src/core/os_chankill.c +++ b/src/core/os_chankill.c @@ -97,7 +97,7 @@ int do_chankill(User * u) if (is_oper(cu->user)) { continue; } - (void) strncpy(mask, "*@", 3); /* Use *@" for the akill's, */ + strncpy(mask, "*@", 3); /* Use *@" for the akill's, */ strncat(mask, cu->user->host, HOSTMAX); add_akill(NULL, mask, s_OperServ, expires, reason); check_akill(cu->user->nick, cu->user->username, diff --git a/src/core/os_defcon.c b/src/core/os_defcon.c index 96d5f9398..8669ff8c6 100644 --- a/src/core/os_defcon.c +++ b/src/core/os_defcon.c @@ -17,7 +17,7 @@ #ifdef _WIN32 extern MDE time_t DefContimer; -extern MDE void runDefCon(void); +extern MDE void runDefCon(); #endif int do_defcon(User * u); void defcon_sendlvls(User * u); diff --git a/src/core/os_logonnews.c b/src/core/os_logonnews.c index cfde08637..135b4c001 100644 --- a/src/core/os_logonnews.c +++ b/src/core/os_logonnews.c @@ -18,7 +18,7 @@ Command *c; void myOperServHelp(User * u); -int load_config(void); +int load_config(); int reload_config(int argc, char **argv); class OSLogonNews : public Module diff --git a/src/core/os_opernews.c b/src/core/os_opernews.c index 82a93b88e..e26a8be5f 100644 --- a/src/core/os_opernews.c +++ b/src/core/os_opernews.c @@ -18,7 +18,7 @@ Command *c; void myOperServHelp(User * u); -int load_config(void); +int load_config(); int reload_config(int argc, char **argv); class OSOperNews : public Module diff --git a/src/core/os_restart.c b/src/core/os_restart.c index cf85f7b0e..178044fa0 100644 --- a/src/core/os_restart.c +++ b/src/core/os_restart.c @@ -17,7 +17,7 @@ #ifdef _WIN32 /* OperServ restart needs access to this if were gonna avoid sending ourself a signal */ -extern MDE void do_restart_services(void); +extern MDE void do_restart_services(); #endif int do_restart(User * u); diff --git a/src/core/os_umode.c b/src/core/os_umode.c index 13b735e83..ca6b5aa9c 100644 --- a/src/core/os_umode.c +++ b/src/core/os_umode.c @@ -42,7 +42,7 @@ class OSUMode : public Module /** * Unload the module **/ -void AnopeFini(void) +void AnopeFini() { } diff --git a/src/datafiles.c b/src/datafiles.c index 541ad9ca5..5c6d3f606 100644 --- a/src/datafiles.c +++ b/src/datafiles.c @@ -571,7 +571,7 @@ static void rename_database(const char *name, char *ext) * * @return void */ -static void remove_backups(void) +static void remove_backups() { char ext[9]; @@ -649,7 +649,7 @@ static void remove_backups(void) * * @return void */ -void backup_databases(void) +void backup_databases() { time_t t; diff --git a/src/helpserv.c b/src/helpserv.c index 3ac81c88e..dbca78791 100644 --- a/src/helpserv.c +++ b/src/helpserv.c @@ -16,7 +16,7 @@ #include "services.h" #include "pseudo.h" -void moduleAddHelpServCmds(void); +void moduleAddHelpServCmds(); /*************************************************************************/ @@ -24,7 +24,7 @@ void moduleAddHelpServCmds(void); * Setup the commands for HelpServ * @return void */ -void moduleAddHelpServCmds(void) +void moduleAddHelpServCmds() { ModuleManager::LoadModuleList(HelpServCoreNumber, HelpServCoreModules); } @@ -35,7 +35,7 @@ void moduleAddHelpServCmds(void) * HelpServ initialization. * @return void */ -void helpserv_init(void) +void helpserv_init() { moduleAddHelpServCmds(); } diff --git a/src/hostserv.c b/src/hostserv.c index bcfde7d53..34b60c67f 100644 --- a/src/hostserv.c +++ b/src/hostserv.c @@ -25,11 +25,11 @@ HostCore *head = NULL; /* head of the HostCore list */ E int do_hs_sync(NickCore * nc, char *vIdent, char *hostmask, char *creator, time_t time); -E void moduleAddHostServCmds(void); +E void moduleAddHostServCmds(); /*************************************************************************/ -void moduleAddHostServCmds(void) +void moduleAddHostServCmds() { ModuleManager::LoadModuleList(HostServCoreNumber, HostServCoreModules); } @@ -69,7 +69,7 @@ void get_hostserv_stats(long *nrec, long *memuse) * HostServ initialization. * @return void */ -void hostserv_init(void) +void hostserv_init() { if (s_HostServ) { moduleAddHostServCmds(); @@ -365,7 +365,7 @@ void delHostCore(char *nick) } \ } while (0) -void load_hs_dbase(void) +void load_hs_dbase() { dbFILE *f; int ver; @@ -429,7 +429,7 @@ void load_hs_dbase(dbFILE * f) } \ } while (0) -void save_hs_dbase(void) +void save_hs_dbase() { dbFILE *f; static time_t lastwarn = 0; diff --git a/src/init.c b/src/init.c index 1168a4515..28e2dade3 100644 --- a/src/init.c +++ b/src/init.c @@ -16,8 +16,8 @@ #include "pseudo.h" Uplink *uplink_server; -extern void moduleAddMsgs(void); -extern void moduleAddIRCDMsgs(void); +extern void moduleAddMsgs(); +extern void moduleAddIRCDMsgs(); /*************************************************************************/ @@ -53,7 +53,7 @@ void introduce_user(const char *user) * defined), else print an error message to logfile and return -1. */ -static int set_group(void) +static int set_group() { #if defined(RUNGROUP) && defined(HAVE_SETGRENT) struct group *gr; @@ -302,7 +302,7 @@ static int parse_options(int ac, char **av) /* Remove our PID file. Done at exit. */ -static void remove_pidfile(void) +static void remove_pidfile() { remove(PIDFilename); } @@ -311,7 +311,7 @@ static void remove_pidfile(void) /* Create our PID file and write the PID to it. */ -static void write_pidfile(void) +static void write_pidfile() { FILE *pidfile; @@ -42,7 +42,7 @@ static int get_logname(char *name, int count, struct tm *tm) /*************************************************************************/ -static void remove_log(void) +static void remove_log() { time_t t; struct tm tm; @@ -67,7 +67,7 @@ static void remove_log(void) /*************************************************************************/ -static void checkday(void) +static void checkday() { time_t t; struct tm tm; @@ -87,7 +87,7 @@ static void checkday(void) /* Open the log file. Return -1 if the log file could not be opened, else * return 0. */ -int open_log(void) +int open_log() { char name[PATH_MAX]; @@ -107,7 +107,7 @@ int open_log(void) /* Close the log file. */ -void close_log(void) +void close_log() { if (!logfile) return; @@ -118,7 +118,7 @@ void close_log(void) /*************************************************************************/ /* added cause this is used over and over in the code */ -char *log_gettimestamp(void) +char *log_gettimestamp() { time_t t; struct tm tm; diff --git a/src/main.c b/src/main.c index 69b887140..fa46eb787 100644 --- a/src/main.c +++ b/src/main.c @@ -98,7 +98,7 @@ static int started = 0; /* Run expiration routines */ -extern void expire_all(void) +extern void expire_all() { waiting = -30; send_event(EVENT_DB_EXPIRE, 1, EVENT_START); @@ -133,7 +133,7 @@ extern void expire_all(void) /*************************************************************************/ -void save_databases(void) +void save_databases() { waiting = -19; send_event(EVENT_DB_SAVING, 1, EVENT_START); @@ -172,7 +172,7 @@ void save_databases(void) /* Restarts services */ -static void services_restart(void) +static void services_restart() { alog("Restarting"); send_event(EVENT_RESTART, 1, EVENT_START); @@ -203,7 +203,7 @@ static void services_restart(void) * Added to allow do_restart from operserv access to the static functions without making them * fair game to every other function - not exactly ideal :| **/ -void do_restart_services(void) +void do_restart_services() { if (!readonly) { expire_all(); @@ -217,7 +217,7 @@ void do_restart_services(void) /* Terminates services */ -static void services_shutdown(void) +static void services_shutdown() { User *u, *next; diff --git a/src/memoserv.c b/src/memoserv.c index 53709c680..5e3eb4b08 100644 --- a/src/memoserv.c +++ b/src/memoserv.c @@ -18,13 +18,13 @@ /*************************************************************************/ /* *INDENT-OFF* */ -E void moduleAddMemoServCmds(void); +E void moduleAddMemoServCmds(); static void new_memo_mail(NickCore *nc, Memo *m); E void rsend_notify(User *u, Memo *m, const char *chan); /*************************************************************************/ -void moduleAddMemoServCmds(void) { +void moduleAddMemoServCmds() { ModuleManager::LoadModuleList(MemoServCoreNumber, MemoServCoreModules); } @@ -36,7 +36,7 @@ void moduleAddMemoServCmds(void) { * MemoServ initialization. * @return void */ -void ms_init(void) +void ms_init() { moduleAddMemoServCmds(); } diff --git a/src/messages.c b/src/messages.c index 81f3d02c0..1a2445a66 100644 --- a/src/messages.c +++ b/src/messages.c @@ -331,7 +331,7 @@ int m_whois(const char *source, const char *who) } /* *INDENT-OFF* */ -void moduleAddMsgs(void) { +void moduleAddMsgs() { Message *m; m = createMessage("STATS", m_stats); addCoreMessage(IRCD,m); m = createMessage("TIME", m_time); addCoreMessage(IRCD,m); diff --git a/src/misc.c b/src/misc.c index ab164800a..b3adc6ae4 100644 --- a/src/misc.c +++ b/src/misc.c @@ -911,7 +911,7 @@ int nickIsServices(const char *tempnick, int bot) * arc4 init * @return void */ -static void arc4_init(void) +static void arc4_init() { int n; for (n = 0; n < 256; n++) @@ -949,7 +949,7 @@ static void arc4_addrandom(void *dat, int datlen) * random init * @return void */ -void rand_init(void) +void rand_init() { int n; #ifndef _WIN32 @@ -1001,7 +1001,7 @@ void rand_init(void) * Setup the random numbers * @return void */ -void add_entropy_userkeys(void) +void add_entropy_userkeys() { arc4_addrandom(&UserKey1, sizeof(UserKey1)); arc4_addrandom(&UserKey2, sizeof(UserKey2)); @@ -1015,7 +1015,7 @@ void add_entropy_userkeys(void) * Get the random numbers 8 byte deep * @return char */ -unsigned char getrandom8(void) +unsigned char getrandom8() { unsigned char si, sj; @@ -1034,7 +1034,7 @@ unsigned char getrandom8(void) * Get the random numbers 16 byte deep * @return char */ -u_int16_t getrandom16(void) +u_int16_t getrandom16() { u_int16_t val; @@ -1049,7 +1049,7 @@ u_int16_t getrandom16(void) * Get the random numbers 32 byte deep * @return char */ -u_int32_t getrandom32(void) +u_int32_t getrandom32() { u_int32_t val; @@ -1275,7 +1275,7 @@ size_t strlcpy(char *dst, const char *src, size_t siz) #ifdef _WIN32 -char *GetWindowsVersion(void) +char *GetWindowsVersion() { OSVERSIONINFOEX osvi; BOOL bOsVersionInfoEx; @@ -1413,7 +1413,7 @@ char *GetWindowsVersion(void) return sstrdup(buf); } -int SupportedWindowsVersion(void) +int SupportedWindowsVersion() { OSVERSIONINFOEX osvi; BOOL bOsVersionInfoEx; diff --git a/src/modules.c b/src/modules.c index cf202916c..0d7bd199b 100644 --- a/src/modules.c +++ b/src/modules.c @@ -59,7 +59,7 @@ char *ModuleGetErrStr(int status) /** * **/ -int encryption_module_init(void) { +int encryption_module_init() { int ret = 0; alog("Loading Encryption Module: [%s]", EncModule); @@ -72,7 +72,7 @@ int encryption_module_init(void) { /** * Load the ircd protocol module up **/ -int protocol_module_init(void) +int protocol_module_init() { int ret = 0; @@ -901,7 +901,7 @@ void moduleCallBackPrepForUnload(const char *mod_name) * This is needed for modules who cant trust the strtok() buffer, as we dont know who will have already messed about with it. * @reutrn a pointer to a copy of the last buffer - DONT mess with this, copy if first if you must do things to it. **/ -char *moduleGetLastBuffer(void) +char *moduleGetLastBuffer() { char *tmp = NULL; if (mod_current_buffer) { @@ -1095,7 +1095,7 @@ bool moduleMinVersion(int major, int minor, int patch, int build) } #ifdef _WIN32 -const char *ano_moderr(void) +const char *ano_moderr() { static char errbuf[513]; DWORD err = GetLastError(); @@ -1224,7 +1224,7 @@ void Module::DeleteLanguage(int langNumber) } } -void ModuleRunTimeDirCleanUp(void) +void ModuleRunTimeDirCleanUp() { #ifndef _WIN32 DIR *dirp; diff --git a/src/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c index 8acd538e8..d63edb29c 100644 --- a/src/modules/cs_appendtopic.c +++ b/src/modules/cs_appendtopic.c @@ -51,7 +51,7 @@ int my_cs_appendtopic(User * u); void my_cs_help(User * u); int my_cs_help_appendtopic(User * u); -void my_add_languages(void); +void my_add_languages(); static Module *me; diff --git a/src/modules/cs_enforce.c b/src/modules/cs_enforce.c index e12f0a8f3..aa5b6be42 100644 --- a/src/modules/cs_enforce.c +++ b/src/modules/cs_enforce.c @@ -21,7 +21,7 @@ int my_cs_enforce(User * u); void my_cs_help(User * u); int my_cs_help_enforce(User * u); -void my_add_languages(voi |
