summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2002-11-11 18:58:24 +0000
committerMarcel Holtmann <marcel@holtmann.org>2002-11-11 18:58:24 +0000
commit878f8c349c5df588e512fbc0e76dfa7baf4b26db (patch)
treebdd30354c0f4cb9d7c75e06230467383d1d09e08
parent0137a3922771558d22189839ce78449397651ca8 (diff)
Add check for (!opt) in cmd_aclmtu() and cmd_scomtu()
-rw-r--r--tools/hciconfig.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index bbc61d0e..65512a09 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -259,7 +259,10 @@ void cmd_aclmtu(int ctl, int hdev, char *opt)
{
struct hci_dev_req dr = { dev_id: hdev };
uint16_t mtu, mpkt;
-
+
+ if (!opt)
+ return;
+
if (sscanf(opt, "%4hu:%4hu", &mtu, &mpkt) != 2)
return;
@@ -277,7 +280,10 @@ void cmd_scomtu(int ctl, int hdev, char *opt)
{
struct hci_dev_req dr = { dev_id: hdev };
uint16_t mtu, mpkt;
-
+
+ if (!opt)
+ return;
+
if (sscanf(opt, "%4hu:%4hu", &mtu, &mpkt) != 2)
return;