From 366e3c0f24d6fa3f4bb929e5c235581adc4006ae Mon Sep 17 00:00:00 2001 From: June Tate-Gans Date: Sun, 25 Apr 2021 14:36:07 -0500 Subject: [PATCH] g13d: Remove an unused block of code We don't actually do anything with an add operation in G13_Device::_init_commands, so fix up the if block. --- g13d/g13.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/g13d/g13.cc b/g13d/g13.cc index f871681..3632ceb 100644 --- a/g13d/g13.cc +++ b/g13d/g13.cc @@ -583,10 +583,10 @@ void G13_Device::_init_commands() { std::string operation, zonename; advance_ws(remainder, operation); advance_ws(remainder, zonename); - if (operation == "add") { - G13_StickZone *zone = _stick.zone(zonename, true); - } else { + + if (operation != "add") { G13_StickZone *zone = _stick.zone(zonename); + if (!zone) { throw G13_CommandException("unknown stick zone"); }