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 73b48ec15f06555c71690911c3e7cbc3f6c02686..e542b7d8173b44ac35ad1aaade05e57d97dbdef2 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 cfd5a57ab4e3c33be3dbe64bb1e98c95c84ef3e7..04ac08b8767ff668c46e8243ccf4153cfe5117e0 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) {