Commit ed0af244 authored by Richard Hughes's avatar Richard Hughes
Browse files

trivial: Use fwupd_device_remove_flag() to remove a single flag

parent 3f94eabe
......@@ -2348,8 +2348,7 @@ fu_plugin_runner_unlock (FuPlugin *self, FuDevice *device, GError **error)
return FALSE;
/* update with correct flags */
flags = fu_device_get_flags (device);
fu_device_set_flags (device, flags &= ~FWUPD_DEVICE_FLAG_LOCKED);
fu_device_remove_flag (device, FWUPD_DEVICE_FLAG_LOCKED);
fu_device_set_modified (device, (guint64) g_get_real_time () / G_USEC_PER_SEC);
return TRUE;
}
......
......@@ -747,7 +747,7 @@ fu_plugin_unlock (FuPlugin *plugin, FuDevice *device, GError **error)
/* clone the info from real device but prevent it from being flashed */
device_flags_alt = fu_device_get_flags (device_alt);
fu_device_set_flags (device, device_flags_alt);
fu_device_set_flags (device_alt, device_flags_alt & ~FWUPD_DEVICE_FLAG_UPDATABLE);
fu_device_remove_flag (device_alt, FWUPD_DEVICE_FLAG_UPDATABLE);
/* make sure that this unlocked device can be updated */
fu_device_set_version_format (device, FWUPD_VERSION_FORMAT_QUAD);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment