Commit 65962510 authored by Sevan Janiyan's avatar Sevan Janiyan Committed by GitHub
Browse files

Void2 (#330)

* Second pass at specifying void in functions with empty argument lists.

* Drop unused function dhcp_reopen()
It's not called anywhere & set to only return 0
parent 64eeb0d6
......@@ -1234,10 +1234,6 @@ int dhcp_new(struct dhcp_t **pdhcp, int numconn, int hashsize,
return 0;
}
int dhcp_reopen() {
return 0;
}
int dhcp_reserve_ip(uint8_t *mac, struct in_addr *ip) {
struct dhcp_conn_t *conn = 0;
......
......@@ -320,7 +320,7 @@ void garden_patricia_load_list(patricia_tree_t **pptree,
garden_patricia_add(&ptlist[i], ptree);
}
void garden_patricia_reload() {
void garden_patricia_reload(void) {
if (_options.patricia) {
garden_patricia_load_list(&dhcp->ptree,
_options.pass_throughs,
......@@ -649,7 +649,7 @@ typedef struct uamdomain_regex_t {
static uamdomain_regex * _list_head = 0;
void garden_free_domainfile() {
void garden_free_domainfile(void) {
while (_list_head) {
uamdomain_regex * n = _list_head;
_list_head = _list_head->next;
......@@ -658,7 +658,7 @@ void garden_free_domainfile() {
}
}
void garden_load_domainfile() {
void garden_load_domainfile(void) {
garden_free_domainfile();
if (!_options.uamdomainfile) return;
else {
......
......@@ -102,12 +102,12 @@ int garden_patricia_check(patricia_tree_t *ptree,
void garden_patricia_load_list(patricia_tree_t **pptree,
pass_through *ptlist,
uint32_t ptcnt);
void garden_patricia_reload();
void garden_patricia_reload(void);
#endif
#ifdef ENABLE_UAMDOMAINFILE
void garden_load_domainfile();
void garden_free_domainfile();
void garden_load_domainfile(void);
void garden_free_domainfile(void);
int garden_check_domainfile(char *question);
#endif
......
......@@ -87,7 +87,7 @@ static int still_running = 0;
static char nas_hwaddr[PKT_ETH_ALEN];
static void print_requests() {
static void print_requests(void) {
proxy_request * req = 0;
int i;
......
......@@ -23,7 +23,7 @@
#include "chilli_module.h"
#endif
void options_init() {
void options_init(void) {
memset(&_options, 0, sizeof(_options));
}
......@@ -666,12 +666,12 @@ int reload_options(int argc, char **argv) {
return ok;
}
void options_destroy() {
void options_destroy(void) {
if (_options._data)
free(_options._data);
}
void options_cleanup() {
void options_cleanup(void) {
char file[128];
#ifdef ENABLE_MODULES
......
......@@ -437,9 +437,9 @@ int process_options(int argc, char **argv, int minimal);
void reprocess_options(int argc, char **argv);
int reload_options(int argc, char **argv);
int options_save(char *file, bstring bt);
void options_init();
void options_destroy();
void options_cleanup();
void options_init(void);
void options_destroy(void);
void options_cleanup(void);
#ifndef MAIN_FILE /* all main() files must implement _options */
extern struct options_t _options;
......
......@@ -57,7 +57,7 @@ static struct nfq_q_handle *qh;
/*static struct nfnl_handle *nh;*/
static int fd;
int q_setup() {
int q_setup(void) {
printf("opening library handle\n");
h = nfq_open();
if (!h) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment