diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-02-21 19:44:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:25 -0500 |
commit | 53769627b93d5b1d04178fd1fb2558d933ee9e81 (patch) | |
tree | 493b4f17a4b47b355ca037f63a15e89d5f2175a9 /lib/parser.c | |
parent | 9e9cdc89695d04359e2d67521199156549c12eb4 (diff) |
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: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/parser.c')
-rw-r--r-- | lib/parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/parser.c b/lib/parser.c index 52cfa69f73df..807b2aaa33fa 100644 --- a/lib/parser.c +++ b/lib/parser.c | |||
@@ -157,7 +157,7 @@ static int match_number(substring_t *s, int *result, int base) | |||
157 | * | 157 | * |
158 | * Description: Attempts to parse the &substring_t @s as a decimal integer. On | 158 | * Description: Attempts to parse the &substring_t @s as a decimal integer. On |
159 | * success, sets @result to the integer represented by the string and returns 0. | 159 | * success, sets @result to the integer represented by the string and returns 0. |
160 | * Returns either -ENOMEM or -EINVAL on failure. | 160 | * Returns -ENOMEM, -EINVAL, or -ERANGE on failure. |
161 | */ | 161 | */ |
162 | int match_int(substring_t *s, int *result) | 162 | int match_int(substring_t *s, int *result) |
163 | { | 163 | { |
@@ -171,7 +171,7 @@ int match_int(substring_t *s, int *result) | |||
171 | * | 171 | * |
172 | * Description: Attempts to parse the &substring_t @s as an octal integer. On | 172 | * Description: Attempts to parse the &substring_t @s as an octal integer. On |
173 | * success, sets @result to the integer represented by the string and returns | 173 | * success, sets @result to the integer represented by the string and returns |
174 | * 0. Returns either -ENOMEM or -EINVAL on failure. | 174 | * 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure. |
175 | */ | 175 | */ |
176 | int match_octal(substring_t *s, int *result) | 176 | int match_octal(substring_t *s, int *result) |
177 | { | 177 | { |
@@ -185,7 +185,7 @@ int match_octal(substring_t *s, int *result) | |||
185 | * | 185 | * |
186 | * Description: Attempts to parse the &substring_t @s as a hexadecimal integer. | 186 | * Description: Attempts to parse the &substring_t @s as a hexadecimal integer. |
187 | * On success, sets @result to the integer represented by the string and | 187 | * On success, sets @result to the integer represented by the string and |
188 | * returns 0. Returns either -ENOMEM or -EINVAL on failure. | 188 | * returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure. |
189 | */ | 189 | */ |
190 | int match_hex(substring_t *s, int *result) | 190 | int match_hex(substring_t *s, int *result) |
191 | { | 191 | { |