From 712b7fbdad7a69f22b94d1af7de6c5f904c3cf3b Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Fri, 17 Jul 2015 20:21:00 -0500 Subject: [PATCH] A bit more accurate, methinks --- src/ax25.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ax25.c b/src/ax25.c index f7a3ccb..be04aa3 100644 --- a/src/ax25.c +++ b/src/ax25.c @@ -101,7 +101,7 @@ error: return -1; } -static ssize_t frame_decode_control(patty_ax25_frame *frame, void *data, off_t offset) { +static ssize_t frame_decode_payload(patty_ax25_frame *frame, void *data, off_t offset) { uint8_t control = ((uint8_t *)data + offset)[0]; size_t decoded = 0; @@ -189,10 +189,10 @@ int patty_ax25_frame_decode(patty_ax25_frame *frame, void *data, size_t size) { } /* - * Now, decode the Control Field, as well as any Protocol Identifier that - * may follow. + * Now, decode the remaining Control Field, optional Protocol Identifier + * field, and payload that may follow. */ - if ((decoded = frame_decode_control(frame, data, offset)) < 0) { + if ((decoded = frame_decode_payload(frame, data, offset)) < 0) { goto error_decode; } else { offset += decoded;