Skip to content

Commit

Permalink
Fix function declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelortmann authored Oct 7, 2023
1 parent 45445f2 commit 5609ed8
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/botnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void remparty(char *bot, int sock)

/* Cancel every user that was on a certain bot
*/
void rempartybot(char *bot)
static void rempartybot(char *bot)
{
int i;

Expand Down
2 changes: 1 addition & 1 deletion src/language.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ char language[64];
/* Add a new preferred language to the list of languages. Newly added
* languages get the highest priority.
*/
void add_lang(char *lang)
static void add_lang(char *lang)
{
lang_pri *lp = langpriority, *lpo = NULL;

Expand Down
5 changes: 2 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ int expmem_botnet();
int expmem_tcl();
int expmem_tclhash();
int expmem_net();
int expmem_modules(int);
int expmem_language();
int expmem_tcldcc();
int expmem_tclmisc();
Expand Down Expand Up @@ -783,8 +782,8 @@ int init_userent();
int init_misc();
int init_bots();
int init_modules();
int init_tcl(int, char **);
int init_language(int);
void init_tcl(int, char **);
void init_language(int);
#ifdef TLS
int ssl_init();
#endif
Expand Down
1 change: 0 additions & 1 deletion src/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ int expmem_tcl();
int expmem_tclhash();
int expmem_tclmisc();
int expmem_net();
int expmem_modules(int);
int expmem_language();
int expmem_tcldcc();
int expmem_dns();
Expand Down
4 changes: 2 additions & 2 deletions src/mod/channels.mod/cmdschan.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ static struct flag_record victim = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };


/* RFC 1035/2812- hostmasks can't be longer than 63 characters */
void truncate_mask_hostname(char *s) {
char *r = NULL;
static void truncate_mask_hostname(char *s) {
char *r = NULL;

if ( (r = strchr(s, '@')) ) {
r++;
Expand Down
2 changes: 1 addition & 1 deletion src/mod/channels.mod/userchan.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ static int u_delinvite(struct chanset_t *c, char *who, int doit)
}

/* Add a !* and/or @* if lacking in a usermask, copying to newmask */
void fix_broken_mask(char *newmask, const char *oldmask, size_t len)
static void fix_broken_mask(char *newmask, const char *oldmask, size_t len)
{
char *strat, *strbang;

Expand Down
6 changes: 3 additions & 3 deletions src/mod/irc.mod/mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ static struct flag_record victim = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
* channel still exists and will refresh the user and victim flag records,
* in case users were also modified.
*/
struct chanset_t *modebind_refresh(char *chname,
char *usrhost, struct flag_record *usr,
char *vcrhost, struct flag_record *vcr)
static struct chanset_t *modebind_refresh(char *chname,
char *usrhost, struct flag_record *usr,
char *vcrhost, struct flag_record *vcr)
{
struct userrec *u;
struct chanset_t *chan;
Expand Down
2 changes: 1 addition & 1 deletion src/mod/server.mod/servmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ struct capability *find_capability(char *capname) {
}

/* Set capability to be requested by Eggdrop */
void add_req(char *cape) {
static void add_req(char *cape) {
struct capability *current = 0;

putlog(LOG_DEBUG, "*", "Adding %s to CAP request list", cape);
Expand Down
4 changes: 2 additions & 2 deletions src/mod/twitch.mod/twitch.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static int twitch_expmem()
}

/* Find a twitch channel by it's display name */
twitchchan_t *findtchan_by_dname(char *name)
static twitchchan_t *findtchan_by_dname(char *name)
{
twitchchan_t *chan;

Expand All @@ -87,7 +87,7 @@ twitchchan_t *findtchan_by_dname(char *name)
}

/* Remove given characters from a string */
void remove_chars(char* str, char c) {
static void remove_chars(char* str, char c) {
char *pr = str, *pw = str;
while (*pr) {
*pw = *pr++;
Expand Down
6 changes: 3 additions & 3 deletions src/mod/uptime.mod/uptime.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static void uptime_report(int idx, int details)
}
}

unsigned long get_ip()
static unsigned long get_ip()
{
struct hostent *hp;
IP ip;
Expand All @@ -130,7 +130,7 @@ unsigned long get_ip()
return ip;
}

int init_uptime(void)
static int init_uptime(void)
{
struct sockaddr_in sai;
char x[64], *z = x;
Expand Down Expand Up @@ -169,7 +169,7 @@ int init_uptime(void)
}


int send_uptime(void)
static int send_uptime(void)
{
struct sockaddr_in sai;
struct stat st;
Expand Down
1 change: 0 additions & 1 deletion src/modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ extern tand_t *tandbot;
extern Tcl_Interp *interp;
extern sock_list *socklist;

int cmd_die();
int xtra_kill();
int xtra_unpack();
static int module_rename(char *name, char *newname);
Expand Down
2 changes: 2 additions & 0 deletions src/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ int check_int_range(char *value, int min, int max);
int stripmodes(char *);
char *stripmasktype(int);
char *check_validpass(struct userrec *, char *);
void cmd_die(struct userrec *, int, char *);

/* dcc.c */
void failed_link(int);
Expand Down Expand Up @@ -191,6 +192,7 @@ void eggContext(const char *, int, const char *);
void eggContextNote(const char *, int, const char *, const char *);
void eggAssert(const char *, int, const char *);
void backup_userfile(void);
int expmem_modules(int);

/* match.c */
int casecharcmp(unsigned char, unsigned char);
Expand Down
4 changes: 2 additions & 2 deletions src/userrec.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ int deluser(char *handle)
return 1;
}

int del_host_or_account(char *handle, char *host, int type)
static int del_host_or_account(char *handle, char *host, int type)
{
struct userrec *u;
struct list_type *q, *qnext, *qprev;
Expand Down Expand Up @@ -866,7 +866,7 @@ int delaccount_by_handle(char *handle, char *acct)
}


void add_host_or_account(char *handle, char *arg, int type)
static void add_host_or_account(char *handle, char *arg, int type)
{
struct userrec *u = get_user_by_handle(userlist, handle);

Expand Down
2 changes: 1 addition & 1 deletion src/users.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void addignore(char *ign, char *from, char *mnote, time_t expire_time)
}

/* take host entry from ignore list and display it ignore-style */
void display_ignore(int idx, int number, struct igrec *ignore)
static void display_ignore(int idx, int number, struct igrec *ignore)
{
char dates[81], s[41];

Expand Down

0 comments on commit 5609ed8

Please sign in to comment.