Skip to content

Commit

Permalink
[PATCH] coverity: fs/ext3/super.c: match_int return check
Browse files Browse the repository at this point in the history
The return value of  "match_int" is  checked  27 out of 28 times

In lib/parser.c
142  	/**
143  	 * match_int: - scan a decimal representation of an integer from a substring_t
144  	 * @s: substring_t to be scanned
145  	 * @Result: resulting integer on success
146  	 *
147  	 * Description: Attempts to parse the &substring_t @s as a decimal integer. On
148  	 * success, sets @Result to the integer represented by the string and returns 0.
149  	 * Returns either -ENOMEM or -EINVAL on failure.
150  	 */
151  	int match_int(substring_t *s, int *result)
152  	{
153  		return match_number(s, result, 0);
154  	}

Signed-off-by: Zaur Kambarov <zkambarov@coverity.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
KAMBAROV, ZAUR authored and Linus Torvalds committed Jun 29, 2005
1 parent ec471dc commit c7f1721
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ext3/super.c
Expand Up @@ -944,7 +944,8 @@ static int parse_options (char * options, struct super_block *sb,
"for remount\n");
return 0;
}
match_int(&args[0], &option);
if (match_int(&args[0], &option) != 0)
return 0;
*n_blocks_count = option;
break;
case Opt_nobh:
Expand Down

0 comments on commit c7f1721

Please sign in to comment.