chiark / gitweb /
Use FORMAT everywhere, and fix up the errors it finds
[secnet.git] / slip.c
diff --git a/slip.c b/slip.c
index a4529262bd1b913de9ec6d40d317cf3583d9d703..0f62a6987268790ce5c4adabf40efa359837a34e 100644 (file)
--- a/slip.c
+++ b/slip.c
@@ -7,6 +7,7 @@
 #include "util.h"
 #include "netlink.h"
 #include "process.h"
+#include "unaligned.h"
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
@@ -125,7 +126,7 @@ static void slip_unstuff(struct slip *st, uint8_t *buf, uint32_t l)
                buffer_init(st->buff,st->nl.max_start_pad);
            } else if (outputchr != OUTPUT_NOTHING) {
                if (st->buff->size < st->buff->len) {
-                   *(uint8_t *)buf_append(st->buff,1)=outputchr;
+                   buf_append_uint8(st->buff,outputchr);
                } else {
                    Message(M_WARNING, "userv_afterpoll: dropping overlong"
                            " SLIP packet\n");
@@ -229,7 +230,8 @@ static void userv_userv_callback(void *sst, pid_t pid, int status)
            fatal("%s: userv exited unexpectedly: uncaught signal %d",
                  st->slip.nl.name,WTERMSIG(status));
        } else {
-           fatal("%s: userv stopped unexpectedly");
+           fatal("%s: userv stopped unexpectedly",
+                 st->slip.nl.name);
        }
     }
     Message(M_WARNING,"%s: userv subprocess died with status %d\n",