Correctly specify functions without arguments
This commit is contained in:
parent
4a44820179
commit
8b4102d61a
3 changed files with 9 additions and 9 deletions
12
ffd/ffd.c
12
ffd/ffd.c
|
@ -66,11 +66,11 @@ static inline bool use_netif(const char *ifname) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void update_time() {
|
||||
static void update_time(void) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
}
|
||||
|
||||
static bool check_config() {
|
||||
static bool check_config(void) {
|
||||
if (!netif_is_mesh(mesh)) {
|
||||
fprintf(stderr, "error: configured interface is no mesh\n");
|
||||
return false;
|
||||
|
@ -79,7 +79,7 @@ static bool check_config() {
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool init_self() {
|
||||
static bool init_self(void) {
|
||||
eth_addr_t primary_addr = netif_mesh_get_primary_addr(mesh);
|
||||
if (is_eth_addr_unspec(&primary_addr))
|
||||
return false;
|
||||
|
@ -109,7 +109,7 @@ static bool init_self() {
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool init_socket() {
|
||||
static bool init_socket(void) {
|
||||
sockfd = socket(AF_PACKET, SOCK_DGRAM, htons(FFD_PROTO));
|
||||
if (sockfd < 0) {
|
||||
fprintf(stderr, "error: socket: %m\n");
|
||||
|
@ -161,7 +161,7 @@ static void update_netif(const char *ifname, unsigned ifindex, void *arg) {
|
|||
iface->addr = netif_get_eth_addr(ifname);
|
||||
}
|
||||
|
||||
static void update_netifs() {
|
||||
static void update_netifs(void) {
|
||||
ffd_iface_t *iface, **cur;
|
||||
|
||||
for (iface = iface_list; iface; iface = iface->next)
|
||||
|
@ -299,7 +299,7 @@ static void handle_tlv(ffd_tlv_type_t type, const void *data, size_t len, void *
|
|||
}
|
||||
}
|
||||
|
||||
static void receive_packet() {
|
||||
static void receive_packet(void) {
|
||||
ffd_packet_t *packet = alloca(sizeof(ffd_packet_t)+FFD_PACKET_MAX);
|
||||
struct sockaddr_ll from;
|
||||
socklen_t fromlen = sizeof(from);
|
||||
|
|
|
@ -138,9 +138,9 @@ extern struct timespec now;
|
|||
|
||||
|
||||
ffd_metric_seqno_t ffd_announce_get_metric(const ffd_announce_t *announce);
|
||||
ffd_announce_t* ffd_announce_new();
|
||||
ffd_announce_t* ffd_announce_new(size_t len);
|
||||
|
||||
void ffd_send_hellos();
|
||||
void ffd_send_hellos(void);
|
||||
void ffd_send_update(ffd_iface_t *iface, ffd_neigh_t *neigh, const ffd_announce_t *announce);
|
||||
void ffd_send_announce_request(ffd_iface_t *iface, ffd_neigh_t *neigh, ffd_node_id_t node, uint16_t type, uint16_t key);
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ static void add_ihus(ffd_packet_t *packet, size_t max_len, const ffd_iface_t *if
|
|||
}
|
||||
}
|
||||
|
||||
void ffd_send_hellos() {
|
||||
void ffd_send_hellos(void) {
|
||||
ffd_packet_t *packet = alloca(sizeof(ffd_packet_t)+FFD_PACKET_MAX);
|
||||
|
||||
packet->version_magic = htons(FFD_VERSION_MAGIC);
|
||||
|
|
Reference in a new issue