diff options
author | Mattias Andrée <maandree@kth.se> | 2017-10-21 19:25:58 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2017-10-21 19:25:58 +0200 |
commit | 87d50c2e9c642e8e9481bd31fcc044f5aa0aca77 (patch) | |
tree | b8eb67c50eb4fec8f32a59fca7d24c48c36faf08 | |
parent | Set errno to ECONNRESET if recv returns 0 (diff) | |
download | sbus-87d50c2e9c642e8e9481bd31fcc044f5aa0aca77.tar.gz sbus-87d50c2e9c642e8e9481bd31fcc044f5aa0aca77.tar.bz2 sbus-87d50c2e9c642e8e9481bd31fcc044f5aa0aca77.tar.xz |
Fix LIBSBUS_MESSAGE check
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | libsbus.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]; |