]> git.proxmox.com Git - fwupd.git/commitdiff
trivial: Do not use a GError for a critical problem
authorRichard Hughes <richard@hughsie.com>
Thu, 15 Dec 2022 12:57:58 +0000 (12:57 +0000)
committerRichard Hughes <richard@hughsie.com>
Thu, 15 Dec 2022 17:27:22 +0000 (17:27 +0000)
libfwupdplugin/fu-quirks.c

index 9b0d258736a39c0b0cbcc26fbb16a9829c2c8cb0..f711dd719647f258e4cd5272117873edc5920280 100644 (file)
@@ -89,8 +89,7 @@ fu_quirks_build_group_key(const gchar *group)
 static gboolean
 fu_quirks_validate_flags(const gchar *value, GError **error)
 {
-       if (value == NULL)
-               return FALSE;
+       g_return_val_if_fail(value != NULL, FALSE);
        for (gsize i = 0; value[i] != '\0'; i++) {
                gchar tmp = value[i];