Revert "make usage of function parameters"

This reverts commit 8108b0d5eb.
This commit is contained in:
thorkill 2015-06-30 18:10:16 +02:00
parent f5f35bd148
commit 8a39621c64
4 changed files with 4 additions and 13 deletions

View file

@ -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;
}

View file

@ -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();
}

View file

@ -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;

View file

@ -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;
}