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(void); +void my_add_languages(); #define LNG_NUM_STRINGS 6 diff --git a/src/modules/cs_tban.c b/src/modules/cs_tban.c index 3fe294700..15ad63306 100644 --- a/src/modules/cs_tban.c +++ b/src/modules/cs_tban.c @@ -31,7 +31,7 @@ void addBan(Channel * c, time_t timeout, char *banmask); int delBan(int argc, char **argv); int canBanUser(Channel * c, User * u, User * u2); -void mAddLanguages(void); +void mAddLanguages(); static Module *me = NULL; diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c index 5aead1a4f..c908db919 100644 --- a/src/modules/hs_request.c +++ b/src/modules/hs_request.c @@ -73,13 +73,13 @@ void show_list(User * u); int hs_do_waiting(User * u); int ns_do_drop(User * u); -void hsreq_save_db(void); -void hsreq_load_db(void); +void hsreq_save_db(); +void hsreq_load_db(); int hsreqevt_db_saving(int argc, char **argv); int hsreqevt_db_backup(int argc, char **argv); -void my_load_config(void); -void my_add_languages(void); +void my_load_config(); +void my_add_languages(); HostCore *hs_request_head; @@ -830,7 +830,7 @@ void hs_help(User * u) if (is_host_setter(u)) me->NoticeLang(s_HostServ, u, LNG_HELP_SETTER); } -void hsreq_load_db(void) +void hsreq_load_db() { FILE *fp; const char *filename; @@ -889,7 +889,7 @@ void hsreq_load_db(void) alog("[hs_request] Succesfully loaded database"); } -void hsreq_save_db(void) +void hsreq_save_db() { FILE *fp; const char *filename; @@ -942,7 +942,7 @@ int hsreqevt_db_backup(int argc, char **argv) return MOD_CONT; } -void my_load_config(void) +void my_load_config() { ConfigReader config; HSRequestMemoUser = config.ReadFlag("hs_request", "memouser", "no", 0); diff --git a/src/modules/ns_maxemail.c b/src/modules/ns_maxemail.c index a3fef5ba5..1626849b8 100644 --- a/src/modules/ns_maxemail.c +++ b/src/modules/ns_maxemail.c @@ -18,8 +18,8 @@ #define AUTHOR "Anope" #define VERSION "$Id$" -void my_load_config(void); -void my_add_languages(void); +void my_load_config(); +void my_add_languages(); int my_ns_register(User * u); int my_ns_set(User * u); int my_event_reload(int argc, char **argv); @@ -200,7 +200,7 @@ int my_event_reload(int argc, char **argv) return MOD_CONT; } -void my_load_config(void) +void my_load_config() { ConfigReader config; NSEmailMax = config.ReadInteger("ns_maxemail", "maxemails", "0", 0, false); diff --git a/src/modules/ns_noop_convert.c b/src/modules/ns_noop_convert.c index 58513ef44..868a54e03 100644 --- a/src/modules/ns_noop_convert.c +++ b/src/modules/ns_noop_convert.c @@ -51,11 +51,11 @@ int mEventJoin(int argc, char **argv); int setAutoOp(User * u); int UnsetAutoOp(User * u); -int mLoadData(void); +int mLoadData(); int mSaveData(int argc, char **argv); int mLoadConfig(int argc, char **argv); -void m_AddLanguages(void); +void m_AddLanguages(); /*************************************************************************/ @@ -92,7 +92,7 @@ class NSNOOPConvert : public Module * Load data from the db file, and populate the autoop setting * @return 0 for success **/ -int mLoadData(void) +int mLoadData() { int ret = 0; int len = 0; diff --git a/src/modules/os_ignore_db.c b/src/modules/os_ignore_db.c index 4fa4f10c1..90d3218e8 100644 --- a/src/modules/os_ignore_db.c +++ b/src/modules/os_ignore_db.c @@ -69,9 +69,9 @@ void fill_db_ptr(DBFile *dbptr, int version, int core_version, char service[256] int save_ignoredb(int argc, char **argv); int backup_ignoredb(int argc, char **argv); -void load_ignore_db(void); -void save_ignore_db(void); -void load_config(void); +void load_ignore_db(); +void save_ignore_db(); +void load_config(); int reload_config(int argc, char **argv); /* ------------------------------------------------------------------------------- */ @@ -120,7 +120,7 @@ class OSIgnoreDB : public Module /* ------------------------------------------------------------------------------- */ -void load_config(void) { +void load_config() { ConfigReader config; std::string tmp = config.ReadValue("os_ignore", "database", DefIgnoreDB, 0); @@ -173,7 +173,7 @@ int backup_ignoredb(int argc, char **argv) { * DataBase Handling **************************************************************************/ -void load_ignore_db(void) { +void load_ignore_db() { DBFile *dbptr = new DBFile; char *key, *value, *mask = NULL; int retval = 0; @@ -267,7 +267,7 @@ void load_ignore_db(void) { } -void save_ignore_db(void) { +void save_ignore_db() { DBFile *dbptr = new DBFile; time_t now; IgnoreData *ign, *next; diff --git a/src/modules/os_info.c b/src/modules/os_info.c index 2ca248774..fbc811e21 100644 --- a/src/modules/os_info.c +++ b/src/modules/os_info.c @@ -51,9 +51,9 @@ int mNickHelp(User * u); int mChanHelp(User * u); void mMainChanHelp(User * u); void mMainNickHelp(User * u); -void m_AddLanguages(void); +void m_AddLanguages(); -int mLoadData(void); +int mLoadData(); int mSaveData(int argc, char **argv); int mBackupData(int argc, char **argv); int mLoadConfig(); @@ -576,7 +576,7 @@ int myChanInfo(User * u) * Load data from the db file, and populate our OperInfo lines * @return 0 for success **/ -int mLoadData(void) +int mLoadData() { int ret = 0; FILE *in; @@ -697,7 +697,7 @@ int mBackupData(int argc, char **argv) * Load the configuration directives from Services configuration file. * @return 0 for success **/ -int mLoadConfig(void) +int mLoadConfig() { ConfigReader config; std::string tmp = config.ReadValue("os_info", "database", DEFAULT_DB_NAME, 0); diff --git a/src/nickserv.c b/src/nickserv.c index d8ed59e99..33f1a84d4 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -35,7 +35,7 @@ static void add_ns_timeout(NickAlias * na, int type, time_t delay); /*************************************************************************/ /* *INDENT-OFF* */ -void moduleAddNickServCmds(void) { +void moduleAddNickServCmds() { ModuleManager::LoadModuleList(NickServCoreNumber, NickServCoreModules); } /* *INDENT-ON* */ @@ -120,7 +120,7 @@ void get_core_stats(long *nrec, long *memuse) /* NickServ initialization. */ -void ns_init(void) +void ns_init() { moduleAddNickServCmds(); guestnum = time(NULL); @@ -165,7 +165,7 @@ void nickserv(User * u, char *buf) } \ } while (0) -void load_ns_req_db(void) +void load_ns_req_db() { dbFILE *f; int i, c, ver; @@ -201,7 +201,7 @@ void load_ns_req_db(void) close_db(f); } -void load_ns_dbase(void) +void load_ns_dbase() { dbFILE *f; int ver, i, j, c; @@ -380,7 +380,7 @@ void load_ns_dbase(void) -void save_ns_dbase(void) +void save_ns_dbase() { dbFILE *f; int i, j; @@ -457,7 +457,7 @@ void save_ns_dbase(void) } -void save_ns_req_dbase(void) +void save_ns_req_dbase() { dbFILE *f; int i; diff --git a/src/operserv.c b/src/operserv.c index 1ba9470e9..2fcf4b139 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -55,7 +55,7 @@ ChannelInfo DefConModesCI; /* ChannelInfo containg params for locked modes */ -void moduleAddOperServCmds(void); +void moduleAddOperServCmds(); /*************************************************************************/ /* Options for the lists */ @@ -73,7 +73,7 @@ SListOpts szopts = { 0, NULL, &is_szline_entry_equal, &free_szline_entry }; /*************************************************************************/ /* *INDENT-OFF* */ -void moduleAddOperServCmds(void) { +void moduleAddOperServCmds() { ModuleManager::LoadModuleList(OperServCoreNumber, OperServCoreModules); } @@ -83,7 +83,7 @@ void moduleAddOperServCmds(void) { /* OperServ initialization. */ -void os_init(void) +void os_init() { moduleAddOperServCmds(); @@ -149,7 +149,7 @@ void operserv(User * u, char *buf) } \ } while (0) -void load_os_dbase(void) +void load_os_dbase() { dbFILE *f; int16 i, ver; @@ -269,7 +269,7 @@ void load_os_dbase(void) } \ } while (0) -void save_os_dbase(void) +void save_os_dbase() { int i; dbFILE *f; @@ -663,7 +663,7 @@ int check_akill(const char *nick, const char *username, const char *host, /* Delete any expired autokills. */ -void expire_akills(void) +void expire_akills() { int i; time_t now = time(NULL); @@ -851,7 +851,7 @@ int check_sgline(const char *nick, const char *realname) /* Delete any expired SGLINEs. */ -void expire_sglines(void) +void expire_sglines() { int i; time_t now = time(NULL); @@ -1071,7 +1071,7 @@ int check_chan_sqline(const char *chan) /* Delete any expired SQLINEs. */ -void expire_sqlines(void) +void expire_sqlines() { int i; time_t now = time(NULL); @@ -1240,7 +1240,7 @@ int check_szline(const char *nick, char *ip) /* Delete any expired SZLINEs. */ -void expire_szlines(void) +void expire_szlines() { int i; time_t now = time(NULL); @@ -1377,7 +1377,7 @@ void resetDefCon(int level) /** * Run DefCon level specific Functions. **/ -void runDefCon(void) +void runDefCon() { char *newmodes; if (checkDefCon(DEFCON_FORCE_CHAN_MODES)) { diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c index 9f92dffa4..26bfa6d8b 100644 --- a/src/protocol/bahamut.c +++ b/src/protocol/bahamut.c @@ -994,7 +994,7 @@ int anope_event_burst(const char *source, int ac, const char **av) /* *INDENT-OFF* */ -void moduleAddIRCDMsgs(void) { +void moduleAddIRCDMsgs() { Message *m; diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index 6ea1c2b2c..14c6254a8 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -1276,7 +1276,7 @@ int anope_event_capab(const char *source, int ac, const char **av) } -void moduleAddIRCDMsgs(void) { +void moduleAddIRCDMsgs() { Message *m; updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a"); diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index 00cc62958..d21b5691c 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -1295,7 +1295,7 @@ int anope_event_capab(const char *source, int ac, const char **av) return MOD_CONT; } -void moduleAddIRCDMsgs(void) { +void moduleAddIRCDMsgs() { Message *m; updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a"); diff --git a/src/protocol/obsolete/charybdis.c b/src/protocol/obsolete/charybdis.c index cee42ce1c..366e09f3c 100644 --- a/src/protocol/obsolete/charybdis.c +++ b/src/protocol/obsolete/charybdis.c @@ -1254,7 +1254,7 @@ int charybdis_send_deaccount(int argc, char **argv) } /* *INDENT-OFF* */ -void moduleAddIRCDMsgs(void) +void moduleAddIRCDMsgs() { Message *m; diff --git a/src/protocol/obsolete/hybrid.c b/src/protocol/obsolete/hybrid.c index 7cc5db5fc..4fcdf2796 100644 --- a/src/protocol/obsolete/hybrid.c +++ b/src/protocol/obsolete/hybrid.c @@ -601,7 +601,7 @@ int anope_event_436(const char *source, int ac, const char **av) /* *INDENT-OFF* */ -void moduleAddIRCDMsgs(void) { +void moduleAddIRCDMsgs() { Message *m; updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-"); diff --git a/src/protocol/obsolete/plexus3.c b/src/protocol/obsolete/plexus3.c index 358522bce..497ae446f 100644 --- a/src/protocol/obsolete/plexus3.c +++ b/src/protocol/obsolete/plexus3.c @@ -680,7 +680,7 @@ anope_event_436 (const char *source, int ac, const char **av) void -moduleAddIRCDMsgs (void) +moduleAddIRCDMsgs () { Message *m; diff --git a/src/protocol/obsolete/ptlink.c b/src/protocol/obsolete/ptlink.c index b0cba3bfa..768a46c15 100644 --- a/src/protocol/obsolete/ptlink.c +++ b/src/protocol/obsolete/ptlink.c @@ -537,7 +537,7 @@ int anope_event_436(const char *source, int ac, const char **av) } -void moduleAddIRCDMsgs(void) +void moduleAddIRCDMsgs() { Message *m; diff --git a/src/protocol/obsolete/rageircd.c b/src/protocol/obsolete/rageircd.c index 4e83bf03f..b61a4cde3 100644 --- a/src/protocol/obsolete/rageircd.c +++ b/src/protocol/obsolete/rageircd.c @@ -498,7 +498,7 @@ int anope_event_436(const char *source, int ac, const char **av) /* *INDENT-OFF* */ -void moduleAddIRCDMsgs(void) { +void moduleAddIRCDMsgs() { Message *m; updateProtectDetails("ADMIN","ADMINME","admin","deadmin","AUTOADMIN","+a","-a"); diff --git a/src/protocol/obsolete/solidircd.c b/src/protocol/obsolete/solidircd.c index b6a70462b..84ff1bdb4 100644 --- a/src/protocol/obsolete/solidircd.c +++ b/src/protocol/obsolete/solidircd.c @@ -638,7 +638,7 @@ int anope_event_436(const char *source, int ac, const char **av) } /* *INDENT-OFF* */ -void moduleAddIRCDMsgs(void) { +void moduleAddIRCDMsgs() { Message *m; updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-"); diff --git a/src/protocol/obsolete/ultimate3.c b/src/protocol/obsolete/ultimate3.c index 92b83d7ab..3aaf9c8c4 100644 --- a/src/protocol/obsolete/ultimate3.c +++ b/src/protocol/obsolete/ultimate3.c @@ -589,7 +589,7 @@ int anope_event_client(const char *source, int ac, const char **av) } /* *INDENT-OFF* */ -void moduleAddIRCDMsgs(void) { +void moduleAddIRCDMsgs() { Message *m; updateProtectDetails("ADMIN","ADMINME","admin","deadmin","AUTOADMIN","+a","-a"); diff --git a/src/protocol/obsolete/viagra.c b/src/protocol/obsolete/viagra.c index dfe3454cd..4a6a431de 100644 --- a/src/protocol/obsolete/viagra.c +++ b/src/protocol/obsolete/viagra.c @@ -670,7 +670,7 @@ int anope_event_error(const char *source, int ac, const char **av) } /* *INDENT-OFF* */ -void moduleAddIRCDMsgs(void) { +void moduleAddIRCDMsgs() { Message *m; updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a"); diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index efe61bd27..c09cd0dc6 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -1100,7 +1100,7 @@ int anope_event_error(const char *source, int ac, const char **av) return MOD_CONT; } -void moduleAddIRCDMsgs(void) +void moduleAddIRCDMsgs() { Message *m; diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index b6986861e..97e523e44 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -1347,7 +1347,7 @@ int anope_event_sjoin(const char *source, int ac, const char **av) return MOD_CONT; } -void moduleAddIRCDMsgs(void) { +void moduleAddIRCDMsgs() { Message *m; updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a"); diff --git a/src/servers.c b/src/servers.c index 97fe5da07..cc56cb331 100644 --- a/src/servers.c +++ b/src/servers.c @@ -597,7 +597,7 @@ static int ts6_uid_initted = 0; static char ts6_new_uid[10]; /* allow for \0 */ static unsigned int ts6_uid_index = 9; /* last slot in uid buf */ -void ts6_uid_init(void) +void ts6_uid_init() { snprintf(ts6_new_uid, 10, "%sAAAAAA", TS6SID); ts6_uid_initted = 1; @@ -622,7 +622,7 @@ void ts6_uid_increment(unsigned int slot) } } -const char *ts6_uid_retrieve(void) +const char *ts6_uid_retrieve() { if (ircd->ts6 == 0) { diff --git a/src/sessions.c b/src/sessions.c index 3c882032d..f598d616d 100644 --- a/src/sessions.c +++ b/src/sessions.c @@ -328,7 +328,7 @@ void del_session(const char *host) /********************** Internal Exception Functions *********************/ /*************************************************************************/ -void expire_exceptions(void) +void expire_exceptions() { int i; time_t now = time(NULL); diff --git a/src/timeout.c b/src/timeout.c index f0c2df417..b8f31765e 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -21,7 +21,7 @@ static Timeout *timeouts = NULL; /* Check the timeout list for any pending actions. */ -void check_timeouts(void) +void check_timeouts() { Timeout *to, *to2; time_t t = time(NULL); diff --git a/src/tools/anopesmtp.c b/src/tools/anopesmtp.c index d00bcdc18..c775921bd 100644 --- a/src/tools/anopesmtp.c +++ b/src/tools/anopesmtp.c @@ -60,7 +60,7 @@ static int get_logname(char *name, int count, struct tm *tm) /* Close the log file. */ -void close_log(void) +void close_log() { if (!logfile) return; @@ -70,7 +70,7 @@ void close_log(void) /*************************************************************************/ -static void remove_log(void) +static void remove_log() { time_t t; struct tm tm; @@ -91,7 +91,7 @@ static void remove_log(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]; @@ -109,7 +109,7 @@ int open_log(void) /*************************************************************************/ -static void checkday(void) +static void checkday() { time_t t; struct tm tm; diff --git a/src/tools/db-convert.c b/src/tools/db-convert.c index 7093f2960..38c2e675d 100644 --- a/src/tools/db-convert.c +++ b/src/tools/db-convert.c @@ -1649,7 +1649,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. */ @@ -1664,7 +1664,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/users.c b/src/users.c index 3a00415ef..3c9dc069e 100644 --- a/src/users.c +++ b/src/users.c @@ -397,7 +397,7 @@ User *finduser(const char *nick) static User *current; static int next_index; -User *firstuser(void) +User *firstuser() { next_index = 0; current = NULL; @@ -409,7 +409,7 @@ User *firstuser(void) return current; } -User *nextuser(void) +User *nextuser() { if (current) current = current->next; @@ -443,7 +443,7 @@ User *find_byuid(const char *uid) static User *current_uid; static int next_index_uid; -User *first_uid(void) +User *first_uid() { next_index_uid = 0; current_uid = NULL; @@ -458,7 +458,7 @@ User *first_uid(void) return current_uid; } -User *next_uid(void) +User *next_uid() { if (current_uid) current_uid = current_uid->next; |