summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-10-02 23:20:02 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-10-02 23:20:02 +0200
commit8b4102d61aa36d96437199f67bd4a6e9a335d2fa (patch)
tree7db487a92c8ec2d9f75657747a1e99582dd49867
parent4a4482017978e360a0ae1ca7645e5e9e084c92b4 (diff)
downloadffd-8b4102d61aa36d96437199f67bd4a6e9a335d2fa.tar
ffd-8b4102d61aa36d96437199f67bd4a6e9a335d2fa.zip
Correctly specify functions without arguments
-rw-r--r--ffd/ffd.c12
-rw-r--r--ffd/ffd.h4
-rw-r--r--ffd/send.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/ffd/ffd.c b/ffd/ffd.c
index 879d710..b1117f0 100644
--- a/ffd/ffd.c
+++ b/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);
diff --git a/ffd/ffd.h b/ffd/ffd.h
index 5d59a23..cf9d59c 100644
--- a/ffd/ffd.h
+++ b/ffd/ffd.h
@@ -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);
diff --git a/ffd/send.c b/ffd/send.c
index 3478e80..fe5035d 100644
--- a/ffd/send.c
+++ b/ffd/send.c
@@ -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);