mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
vboxDumpDisplay: remove suspicious strlen
The return type of strlen is 'size_t', which is unsigned and therefore never less than zero. Use STREQ to make the check obvious.
This commit is contained in:
parent
5a16197459
commit
c5972df7d5
@ -3336,7 +3336,7 @@ vboxDumpDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
|
||||
VBOX_UTF16_TO_UTF8(valueDisplayUtf16, &valueDisplayUtf8);
|
||||
VBOX_UTF16_FREE(valueDisplayUtf16);
|
||||
|
||||
if (strlen(valueDisplayUtf8) <= 0)
|
||||
if (STREQ(valueDisplayUtf8, ""))
|
||||
VBOX_UTF8_FREE(valueDisplayUtf8);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user