diff mbox

[1/1] makedevs: Fixed error introduced in previous commit

Message ID 8284518232696c8cb23dbaeb8cb502ba8183c853.1357723114.git.kibo@prevas.dk
State Accepted
Delegated to: Esben Haabendal
Headers show

Commit Message

Kim Bøndergaard Jan. 9, 2013, 9:43 a.m. UTC
---
 recipes/makedevs/makedevs-1.0.0/makedevs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Esben Haabendal Jan. 14, 2013, 12:54 p.m. UTC | #1
Kim Bøndergaard <kibo@prevas.dk> writes:

> ---
>  recipes/makedevs/makedevs-1.0.0/makedevs.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/recipes/makedevs/makedevs-1.0.0/makedevs.c b/recipes/makedevs/makedevs-1.0.0/makedevs.c
> index 4953d79..5a017c5 100644
> --- a/recipes/makedevs/makedevs-1.0.0/makedevs.c
> +++ b/recipes/makedevs/makedevs-1.0.0/makedevs.c
> @@ -196,7 +196,7 @@ static int interpret_table_entry(char *line)
>  
>  	if (0 > sscanf(line, "%40s %c %lo %lu %lu %lu %lu %lu %lu %20s", path,
>  		    &type, &mode, &uid, &gid, &major, &minor, &start,
> -		    &increment, &countstr)) 
> +		    &increment, countstr)) 
>  	{
>  		return 1;
>  	}
> @@ -205,9 +205,8 @@ static int interpret_table_entry(char *line)
>  		pcountstr++;
>  		do_hex = 1;
>  	}
> -	if (0 > sscanf(pcountstr,"%lu", &count)) {
> -		return 1;
> -	}
> +	sscanf(pcountstr,"%lu", &count);
> +	
>  	if (!strcmp(path, "/")) {
>  		error_msg_and_die("Device table entries require absolute paths");
>  	}

Merged to master, thanks.

/Esben
diff mbox

Patch

diff --git a/recipes/makedevs/makedevs-1.0.0/makedevs.c b/recipes/makedevs/makedevs-1.0.0/makedevs.c
index 4953d79..5a017c5 100644
--- a/recipes/makedevs/makedevs-1.0.0/makedevs.c
+++ b/recipes/makedevs/makedevs-1.0.0/makedevs.c
@@ -196,7 +196,7 @@  static int interpret_table_entry(char *line)
 
 	if (0 > sscanf(line, "%40s %c %lo %lu %lu %lu %lu %lu %lu %20s", path,
 		    &type, &mode, &uid, &gid, &major, &minor, &start,
-		    &increment, &countstr)) 
+		    &increment, countstr)) 
 	{
 		return 1;
 	}
@@ -205,9 +205,8 @@  static int interpret_table_entry(char *line)
 		pcountstr++;
 		do_hex = 1;
 	}
-	if (0 > sscanf(pcountstr,"%lu", &count)) {
-		return 1;
-	}
+	sscanf(pcountstr,"%lu", &count);
+	
 	if (!strcmp(path, "/")) {
 		error_msg_and_die("Device table entries require absolute paths");
 	}