From a74e383f8d20c7faf95edd96c4d0b0fe82373f52 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 9 Sep 2022 10:47:07 +0100 Subject: [PATCH] synaptics-cxaudio: Use fu_strtobool() to parse TRUE and FALSE PVS: Converting type 'guint64' to type 'gboolean' can lead to a loss of high-order bits. --- plugins/synaptics-cxaudio/fu-synaptics-cxaudio-device.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/synaptics-cxaudio/fu-synaptics-cxaudio-device.c b/plugins/synaptics-cxaudio/fu-synaptics-cxaudio-device.c index 2369a349a..3d78e23db 100644 --- a/plugins/synaptics-cxaudio/fu-synaptics-cxaudio-device.c +++ b/plugins/synaptics-cxaudio/fu-synaptics-cxaudio-device.c @@ -819,12 +819,8 @@ fu_synaptics_cxaudio_device_set_quirk_kv(FuDevice *device, self->chip_id_base = tmp; return TRUE; } - if (g_strcmp0(key, "CxaudioSoftwareReset") == 0) { - if (!fu_strtoull(value, &tmp, 0, G_MAXUINT32, error)) - return FALSE; - self->sw_reset_supported = tmp; - return TRUE; - } + if (g_strcmp0(key, "CxaudioSoftwareReset") == 0) + return fu_strtobool(value, &self->sw_reset_supported, error); if (g_strcmp0(key, "CxaudioPatch1ValidAddr") == 0) { if (!fu_strtoull(value, &tmp, 0, G_MAXUINT32, error)) return FALSE;