Merge tag 'v2021.10-rc4' into next
[platform/kernel/u-boot.git] / include / vsprintf.h
index debf977..83d187e 100644 (file)
  * the end these are ignored. In the worst case, if all characters are invalid,
  * 0 is returned
  *
- * If @base is 0, octal or hex prefixes are supported (e.g. 0777, 0x123) to
- * select a particular base. By default decimal is used.
+ * A hex prefix is supported (e.g. 0x123) regardless of the value of @base.
+ * If found, the base is set to hex (16).
+ *
+ * If @base is 0:
+ *    - an octal '0' prefix (e.g. 0777) sets the base to octal (8).
+ *    - otherwise the base defaults to decimal (10).
  */
 ulong simple_strtoul(const char *cp, char **endp, unsigned int base);
 
@@ -71,8 +75,12 @@ unsigned long dectoul(const char *cp, char **endp);
  *
  * echo will append a newline to the tail.
  *
- * If @base is 0, octal or hex prefixes are supported (e.g. 0777, 0x123) to
- * select a particular base. By default decimal is used.
+ * A hex prefix is supported (e.g. 0x123) regardless of the value of @base.
+ * If found, the base is set to hex (16).
+ *
+ * If @base is 0:
+ *    - an octal '0' prefix (e.g. 0777) sets the base to octal (8).
+ *    - otherwise the base defaults to decimal (10).
  *
  * Copied this function from Linux 2.6.38 commit ID:
  * 521cb40b0c44418a4fd36dc633f575813d59a43d