Fix: Eliminate warnings
Consider warnings as errors and correct them.
Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
Change-Id: I2d777ee56b21750966b75147be6c4eb73229043f
diff --git a/components/common/uuid/uuid.c b/components/common/uuid/uuid.c
index 6d26cfa..16b6730 100644
--- a/components/common/uuid/uuid.c
+++ b/components/common/uuid/uuid.c
@@ -52,10 +52,7 @@
/* Note that a valid canonical uuid may be part of a longer string
* such as a urn.
*/
- size_t input_len = strnlen(canonical_form, UUID_CANONICAL_FORM_LEN);
-
- if (input_len == UUID_CANONICAL_FORM_LEN) {
-
+ if (!memchr(canonical_form, '\0', UUID_CANONICAL_FORM_LEN)) {
size_t i;
valid_chars = UUID_CANONICAL_FORM_LEN;