The return type of strlen is 'size_t', which is unsigned and therefore
never less than zero.
Use STREQ to make the check obvious.
---
src/vbox/vbox_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 71fc62b..0c0dc96 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -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);
}
--
2.4.10