aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-10-21 19:25:58 +0200
committerMattias Andrée <maandree@kth.se>2017-10-21 19:25:58 +0200
commit87d50c2e9c642e8e9481bd31fcc044f5aa0aca77 (patch)
treeb8eb67c50eb4fec8f32a59fca7d24c48c36faf08
parentSet errno to ECONNRESET if recv returns 0 (diff)
downloadsbus-87d50c2e9c642e8e9481bd31fcc044f5aa0aca77.tar.gz
sbus-87d50c2e9c642e8e9481bd31fcc044f5aa0aca77.tar.bz2
sbus-87d50c2e9c642e8e9481bd31fcc044f5aa0aca77.tar.xz
Fix LIBSBUS_MESSAGE check
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libsbus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsbus.c b/libsbus.c
index 5b238c8..88e6a31 100644
--- a/libsbus.c
+++ b/libsbus.c
@@ -74,7 +74,7 @@ libsbus_receive(int fd, int flags, char *buf, union libsbus_packet *packet)
if (r >= 4 && !strncmp(buf, "MSG ", 4)) {
p = memchr(buf, '\0', r);
- if (!*p++)
+ if (!p++)
goto unknown;
packet->type = LIBSBUS_MESSAGE;
packet->message.key = &buf[4];