Commit 53769627 authored by Namjae Jeon's avatar Namjae Jeon Committed by Linus Torvalds

lib/parser.c: fix up comments for valid return values from match_number

match_number() has return values of -ENOMEM, -EINVAL and -ERANGE.  So, for
all the functions calling match_number, the return value should include
these values.  Fix up the comments to reflect the correct values.
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarAmit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9e9cdc89
...@@ -157,7 +157,7 @@ static int match_number(substring_t *s, int *result, int base) ...@@ -157,7 +157,7 @@ static int match_number(substring_t *s, int *result, int base)
* *
* Description: Attempts to parse the &substring_t @s as a decimal integer. On * Description: Attempts to parse the &substring_t @s as a decimal integer. On
* success, sets @result to the integer represented by the string and returns 0. * success, sets @result to the integer represented by the string and returns 0.
* Returns either -ENOMEM or -EINVAL on failure. * Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
*/ */
int match_int(substring_t *s, int *result) int match_int(substring_t *s, int *result)
{ {
...@@ -171,7 +171,7 @@ int match_int(substring_t *s, int *result) ...@@ -171,7 +171,7 @@ int match_int(substring_t *s, int *result)
* *
* Description: Attempts to parse the &substring_t @s as an octal integer. On * Description: Attempts to parse the &substring_t @s as an octal integer. On
* success, sets @result to the integer represented by the string and returns * success, sets @result to the integer represented by the string and returns
* 0. Returns either -ENOMEM or -EINVAL on failure. * 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
*/ */
int match_octal(substring_t *s, int *result) int match_octal(substring_t *s, int *result)
{ {
...@@ -185,7 +185,7 @@ int match_octal(substring_t *s, int *result) ...@@ -185,7 +185,7 @@ int match_octal(substring_t *s, int *result)
* *
* Description: Attempts to parse the &substring_t @s as a hexadecimal integer. * Description: Attempts to parse the &substring_t @s as a hexadecimal integer.
* On success, sets @result to the integer represented by the string and * On success, sets @result to the integer represented by the string and
* returns 0. Returns either -ENOMEM or -EINVAL on failure. * returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure.
*/ */
int match_hex(substring_t *s, int *result) int match_hex(substring_t *s, int *result)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment