From: Dhaval Giani Date: Tue, 1 Jun 2010 15:36:38 +0000 (+0200) Subject: libcgroup: Return correct values in parse.y X-Git-Tag: v0.36.2~2^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e081ccce48c94c8a76b23ca28069ceafd4a269a;p=thirdparty%2Flibcgroup.git libcgroup: Return correct values in parse.y Instead of returning a valid error on failure in parse.y, we were returning 0. Fix that up. Signed-off-by: Dhaval Giani --- diff --git a/src/parse.y b/src/parse.y index a8cc864e..d4097425 100644 --- a/src/parse.y +++ b/src/parse.y @@ -249,7 +249,7 @@ mountvalue_conf { if (!cgroup_config_insert_into_mount_table($1, $3)) { cgroup_config_cleanup_mount_table(); - $$ = 0; + $$ = ECGCONFIGPARSEFAIL; return $$; } $$ = 1; @@ -258,7 +258,7 @@ mountvalue_conf { if (!cgroup_config_insert_into_mount_table($2, $4)) { cgroup_config_cleanup_mount_table(); - $$ = 0; + $$ = ECGCONFIGPARSEFAIL; return $$; } $$ = 1; @@ -282,7 +282,7 @@ namespace_conf { if (!cgroup_config_insert_into_namespace_table($1, $3)) { cgroup_config_cleanup_namespace_table(); - $$ = 0; + $$ = ECGCONFIGPARSEFAIL; return $$; } $$ = 1; @@ -291,7 +291,7 @@ namespace_conf { if (!cgroup_config_insert_into_namespace_table($2, $4)) { cgroup_config_cleanup_namespace_table(); - $$ = 0; + $$ = ECGCONFIGPARSEFAIL; return $$; } $$ = 1; @@ -304,7 +304,7 @@ namespace : NAMESPACE '{' namespace_conf '}' if (!$$) { fprintf(stderr, "parsing failed at line number %d\n", line_no); - $$ = 0; + $$ = ECGCONFIGPARSEFAIL; return $$; } }