[PATCH 11/17] uuid: Add a comment for UUID_STR_LEN
Simon Glass
sjg at chromium.org
Thu Jan 14 04:29:51 CET 2021
This macro is the length of the string but excludes the terminator. Users
must add 1 when declaring a large-enough string. Add a comment to make
this clear.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
include/uuid.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uuid.h b/include/uuid.h
index 73c5a89ec7c..f82f6dc5eff 100644
--- a/include/uuid.h
+++ b/include/uuid.h
@@ -23,6 +23,7 @@ struct uuid {
#define UUID_STR_FORMAT_GUID BIT(0)
#define UUID_STR_UPPER_CASE BIT(1)
+/* Use UUID_STR_LEN + 1 for string space */
#define UUID_STR_LEN 36
#define UUID_BIN_LEN sizeof(struct uuid)
--
2.30.0.284.gd98b1dd5eaa7-goog
More information about the U-Boot
mailing list