From 2c5076cc7ad141d8246626ab1a82e65f1c126d59 Mon Sep 17 00:00:00 2001 From: bigbear Date: Thu, 8 Feb 2024 02:46:56 +0100 Subject: FIX CodeQL warnings --- hardinfo2/dmi_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hardinfo2/dmi_util.c') diff --git a/hardinfo2/dmi_util.c b/hardinfo2/dmi_util.c index 5482c151..35f9282f 100644 --- a/hardinfo2/dmi_util.c +++ b/hardinfo2/dmi_util.c @@ -71,10 +71,10 @@ static const char *dmi_type_strings[] = { * returns -1 if error, 0 if ok, 1 if ignored */ static int ignore_placeholder_strings(gchar **pstr) { gchar *chk, *p; - chk = g_strdup(*pstr); - if (pstr == NULL || *pstr == NULL) return -1; + chk = g_strdup(*pstr); + #define DMI_IGNORE(m) if (strcasecmp(m, *pstr) == 0) { g_free(chk); g_free(*pstr); *pstr = NULL; return 1; } DMI_IGNORE("To be filled by O.E.M."); DMI_IGNORE("Default String"); -- cgit v1.2.3