File pacemaker-libcrmcommon-improve-empty-string-check.patch of Package pacemaker.19778
commit 8031af606a04feff3c9b695ec7fe1a8a5abe6bb7
Author: Ken Gaillot <kgaillot@redhat.com>
Date: Wed Apr 4 18:26:00 2018 -0500
Refactor: libcrmcommon: improve empty string check
more efficient, and avoiding <0 comparison for unsigned value makes
static analysis happy
diff --git a/lib/common/iso8601.c b/lib/common/iso8601.c
index 517c50daf..e5683117a 100644
--- a/lib/common/iso8601.c
+++ b/lib/common/iso8601.c
@@ -784,7 +784,7 @@ parse_int(const char *str, int field_width, int uppper_bound, int *result)
*result = 0;
- if (strlen(str) <= 0) {
+ if (*str == '\0') {
return FALSE;
}