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

Commit 55d4ad8d authored by Sal Savage's avatar Sal Savage Committed by Android (Google) Code Review
Browse files

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

parents 86435df4 6a222a4a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2227,13 +2227,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 {