Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a8da543 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix error checking logic -- "if it doesn't have a value""

parents 22209c9e ba9ca1ae
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2228,13 +2228,13 @@ void btif_dm_get_local_class_of_device(DEV_CLASS device_class) {
  // Error check the inputs. Use the default if problems are found
  if (local_device_class.size() != 3) {
    LOG_ERROR("COD malformed, must have unsigned 3 integers.");
  } else if (local_device_class[0].has_value()
  } else if (!local_device_class[0].has_value()
      || local_device_class[0].value() > 0xFF) {
    LOG_ERROR("COD malformed, first value is missing or too large.");
  } else if (local_device_class[1].has_value()
  } else if (!local_device_class[1].has_value()
      || local_device_class[1].value() > 0xFF) {
    LOG_ERROR("COD malformed, second value is missing or too large.");
  } else if (local_device_class[2].has_value()
  } else if (!local_device_class[2].has_value()
      || local_device_class[2].value() > 0xFF) {
    LOG_ERROR("COD malformed, third value is missing or too large.");
  } else {