chiark / gitweb /
cleanup: fix up the type of string buffers
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 May 2011 20:00:20 +0000 (21:00 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Jun 2011 15:37:59 +0000 (16:37 +0100)
vsnprintf expects a char*, and the format string passed to ->log does
too, so make buffers be char[].

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Richard Kettlewell <richard@greenend.org.uk>
site.c
tun.c

diff --git a/site.c b/site.c
index 73b48ec..e542b7d 100644 (file)
--- a/site.c
+++ b/site.c
@@ -197,7 +197,7 @@ struct site {
 static void slog(struct site *st, uint32_t event, cstring_t msg, ...)
 {
     va_list ap;
-    uint8_t buf[240];
+    char buf[240];
     uint32_t class;
 
     va_start(ap,msg);
diff --git a/tun.c b/tun.c
index cfd5a57..04ac08b 100644 (file)
--- a/tun.c
+++ b/tun.c
@@ -234,7 +234,7 @@ static void tun_phase_hook(void *sst, uint32_t newphase)
 {
     struct tun *st=sst;
     string_t hostaddr,secnetaddr;
-    uint8_t mtu[6];
+    char mtu[6];
     struct netlink_client *r;
 
     if (st->tun_flavour==TUN_FLAVOUR_BSD) {