summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2013-09-16 13:43:01 (GMT)
committerChristian Pointner <equinox@helsinki.at>2013-09-16 13:43:01 (GMT)
commit549acaede7b62e4fcbb7c0bbc8b5e8f5ac420d9b (patch)
tree6639cea4b96bea4261fe40882f472b03a0f76b5e /log.c
parentba9fe029984b9b1614bdfc81072a3e95675bd74a (diff)
code cleanups and fixes (new gcc and clang)
Diffstat (limited to 'log.c')
-rw-r--r--log.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/log.c b/log.c
index 43a0a5a..6f8f622 100644
--- a/log.c
+++ b/log.c
@@ -13,7 +13,7 @@
* message authentication based on the methodes used by SRTP. It is
* intended to deliver a generic, scaleable and secure solution for
* tunneling and relaying of packets of any protocol.
- *
+ *
*
* Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
*
@@ -39,6 +39,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
+#include <ctype.h>
#define SYSLOG_NAMES
#include <syslog.h>
@@ -84,7 +85,7 @@ int log_targets_target_exists(log_targets_t* targets, log_target_type_t type)
if(tmp->type_ == type)
return 1;
tmp = tmp->next_;
- }
+ }
return 0;
}
@@ -147,7 +148,7 @@ int log_targets_add(log_targets_t* targets, const char* conf)
log_target_t* tmp = targets->first_;
while(tmp->next_)
tmp = tmp->next_;
-
+
tmp->next_ = new_target;
}
return 0;
@@ -246,8 +247,8 @@ void log_print_hex_dump(log_prio_t prio, const u_int8_t* buf, u_int32_t len)
int offset = snprintf(msg, MSG_LENGTH_MAX, "dump(%d): ", len);
if(offset < 0)
return;
- u_int8_t* ptr = &msg[offset];
-
+ char* ptr = &msg[offset];
+
for(i=0; i < len; i++) {
if(((i+1)*3) >= (MSG_LENGTH_MAX - offset))
break;