From f6ddb4675c096dc81420ed84fb2a6fefa9fea563 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Mon, 14 Jul 2014 13:07:08 +0000 Subject: gluster: Fix the recursive goto outs in the source code. Added a script check_goto.pl, that when run from the source code root, will scan all .c files to match the following pattern: label: if (condition) goto label; On finding such a pattern the script will print the file name and the line number. There are certain cases where the above recursive pattern is intended. Hence adding those labels to ignore-labels. Thanks Vijaikumar Mallikarjuna for the perl script. Also fixed all such existing errors Change-Id: I1b821d0a8c296f16e40faff20bd029bdc880c2e9 BUG: 1119256 Signed-off-by: Vijaikumar Mallikarjuna Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/8307 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-quota.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-quota.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c index e4a48439812..14767f75089 100644 --- a/xlators/mgmt/glusterd/src/glusterd-quota.c +++ b/xlators/mgmt/glusterd/src/glusterd-quota.c @@ -755,16 +755,14 @@ out: if (ret) { gf_log (this->name, GF_LOG_ERROR, "Failed to " "compute cksum for quota conf file"); - goto out; + return ret; } ret = glusterd_store_save_quota_version_and_cksum (volinfo); - if (ret) { + if (ret) gf_log (this->name, GF_LOG_ERROR, "Failed to " "store quota version and cksum"); - goto out; - } } } -- cgit