diff options
author | Avra Sengupta <asengupt@redhat.com> | 2014-07-14 13:07:08 +0000 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-07-21 10:26:20 -0700 |
commit | f6ddb4675c096dc81420ed84fb2a6fefa9fea563 (patch) | |
tree | f30bc40d63483a62da05c98d723b3a8bcdfbb468 /extras/test | |
parent | 5b8de971a4b81bc2bd6de0ffc6386587226295c6 (diff) |
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 <vmallika@redhat.com>
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/8307
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'extras/test')
-rw-r--r-- | extras/test/test-ffop.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/extras/test/test-ffop.c b/extras/test/test-ffop.c index 2d174d45276..219dd6a2da2 100644 --- a/extras/test/test-ffop.c +++ b/extras/test/test-ffop.c @@ -518,10 +518,8 @@ out: if (newfd) close (newfd); ret = unlink (filename); - if (ret < 0) { + if (ret < 0) fprintf (stderr, "unlink failed : %s\n", strerror (errno)); - goto out; - } return ret; } |