From a15469242226188115546fb52ebc810a941453b1 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Sun, 8 Sep 2019 21:40:15 -0700 Subject: [PATCH] [cli] add error check to `udp send` command (#4148) --- src/cli/cli_udp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli/cli_udp.cpp b/src/cli/cli_udp.cpp index c13fb1cbc..60f9ddba9 100644 --- a/src/cli/cli_udp.cpp +++ b/src/cli/cli_udp.cpp @@ -148,7 +148,8 @@ otError UdpExample::ProcessSend(int argc, char *argv[]) { if (strcmp(argv[curArg++], "-s") == 0) { - Interpreter::ParseUnsignedLong(argv[curArg++], autoGenMessageLength); + error = Interpreter::ParseUnsignedLong(argv[curArg++], autoGenMessageLength); + SuccessOrExit(error); } else {