mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-21 15:34:59 +00:00
tpm: Optimize the string parsing and fix the boolean logic
The g_ascii_isgraph() correctly handles NUL so just remove the check rather than adding brackets around the logic.
This commit is contained in:
parent
04fde48e9a
commit
b27f0d42f9
@ -75,7 +75,7 @@ fu_tpm_device_get_string (ESYS_CONTEXT *ctx, guint32 query, GError **error)
|
||||
|
||||
/* convert non-ASCII into spaces */
|
||||
for (guint i = 0; i < 4; i++) {
|
||||
if (!g_ascii_isgraph (result[i]) && result[i] != '\0')
|
||||
if (!g_ascii_isgraph (result[i]))
|
||||
result[i] = 0x20;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user