From 5befa798b591dbce9f7330307f02028bde65d49d Mon Sep 17 00:00:00 2001 From: Tom Early Date: Mon, 11 Feb 2019 14:09:38 -0700 Subject: [PATCH] fixed check for size --- QnetRemote.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/QnetRemote.cpp b/QnetRemote.cpp index 4cb3506..5a8e7a5 100644 --- a/QnetRemote.cpp +++ b/QnetRemote.cpp @@ -235,8 +235,7 @@ int main(int argc, char *argv[]) calcPFCS(pkt.title); // send the header - int sent = ToGateway.Write(pkt.title, 56); - if (sent != 58) { + if (56 != ToGateway.Write(pkt.title, 56)) { printf("%s: ERROR: Couldn't send header!\n", argv[0]); return 1; } @@ -303,8 +302,7 @@ int main(int argc, char *argv[]) break; } - sent = ToGateway.Write(pkt.title, 27); - if (sent != 29) { + if (27 != ToGateway.Write(pkt.title, 27)) { printf("%s: ERROR: could not send voice packet %d\n", argv[0], i); return 1; }