From 8a39621c6435036adc81edb07f8ca2cd4cba43cb Mon Sep 17 00:00:00 2001 From: thorkill Date: Tue, 30 Jun 2015 18:10:16 +0200 Subject: [PATCH] Revert "make usage of function parameters" This reverts commit 8108b0d5eb8603595a29c1b6fa9acc89f8284fe3. --- src/dummy_device.c | 6 ------ src/meta.c | 2 +- src/net_packet.c | 5 +---- src/net_socket.c | 4 ++-- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/dummy_device.c b/src/dummy_device.c index 10000c6e..c43d5862 100644 --- a/src/dummy_device.c +++ b/src/dummy_device.c @@ -36,16 +36,10 @@ static void close_device(void) { } static bool read_packet(vpn_packet_t *packet) { - // silence unsued parameter error - if (packet) - return false; return false; } static bool write_packet(vpn_packet_t *packet) { - // silence unsued parameter error - if (packet) - return true; return true; } diff --git a/src/meta.c b/src/meta.c index 9038ff85..ff06d0ce 100644 --- a/src/meta.c +++ b/src/meta.c @@ -38,7 +38,7 @@ bool send_meta_sptps(void *handle, uint8_t type, const void *buffer, size_t leng connection_t *c = handle; if(!c) { - logger(DEBUG_ALWAYS, LOG_ERR, "send_meta_sptps() called with NULL pointer! [type: %d]", type); + logger(DEBUG_ALWAYS, LOG_ERR, "send_meta_sptps() called with NULL pointer!"); abort(); } diff --git a/src/net_packet.c b/src/net_packet.c index 91a642ca..a95e9771 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -1406,7 +1406,7 @@ void handle_incoming_vpn_data(void *data, int flags) { if(len <= 0 || len > MAXSIZE) { if(!sockwouldblock(sockerrno)) - logger(DEBUG_ALWAYS, LOG_ERR, "Receiving packet failed: %s [flags: %x]", sockstrerror(sockerrno), flags); + logger(DEBUG_ALWAYS, LOG_ERR, "Receiving packet failed: %s", sockstrerror(sockerrno)); return; } @@ -1514,9 +1514,6 @@ skip_harder: void handle_device_data(void *data, int flags) { vpn_packet_t packet; - - logger(DEBUG_TRAFFIC, LOG_INFO, "Handle device data at 0x%x flags 0x%x", data, flags); - packet.offset = DEFAULT_PACKET_OFFSET; packet.priority = 0; diff --git a/src/net_socket.c b/src/net_socket.c index dede7d6c..8acd4b45 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -639,7 +639,7 @@ void handle_new_meta_connection(void *data, int flags) { fd = accept(l->tcp.fd, &sa.sa, &len); if(fd < 0) { - logger(DEBUG_ALWAYS, LOG_ERR, "Accepting a new connection failed: %s, data at 0x%x flags 0x%x", sockstrerror(sockerrno), data, flags); + logger(DEBUG_ALWAYS, LOG_ERR, "Accepting a new connection failed: %s", sockstrerror(sockerrno)); return; } @@ -736,7 +736,7 @@ void handle_new_unix_connection(void *data, int flags) { fd = accept(io->fd, &sa.sa, &len); if(fd < 0) { - logger(DEBUG_ALWAYS, LOG_ERR, "Accepting a new connection failed: %s data at 0x%x flags 0x%x", sockstrerror(sockerrno), data, flags); + logger(DEBUG_ALWAYS, LOG_ERR, "Accepting a new connection failed: %s", sockstrerror(sockerrno)); return; }