diff options
author | Martin Kletzander <mkletzan@redhat.com> | 2012-03-22 12:33:35 +0100 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2012-03-26 14:45:22 -0600 |
commit | 9943276fd2d068756a5f11c4e1aa22e915ddb0c9 (patch) | |
tree | 6b064566d611988d6ea7320673c5bb292dc52fb7 /tests/storagevolxml2xmltest.c | |
parent | Fix and test round-trip of query parameters (diff) | |
download | libvirt-9943276fd2d068756a5f11c4e1aa22e915ddb0c9.tar.gz libvirt-9943276fd2d068756a5f11c4e1aa22e915ddb0c9.tar.bz2 libvirt-9943276fd2d068756a5f11c4e1aa22e915ddb0c9.zip |
Cleanup for a return statement in source files
Return statements with parameter enclosed in parentheses were modified
and parentheses were removed. The whole change was scripted, here is how:
List of files was obtained using this command:
git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \
grep -e '\.[ch]$' -e '\.py$'
Found files were modified with this command:
sed -i -e \
's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
Then checked for nonsense.
The whole command looks like this:
git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \
grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e \
's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
Diffstat (limited to 'tests/storagevolxml2xmltest.c')
-rw-r--r-- | tests/storagevolxml2xmltest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/storagevolxml2xmltest.c b/tests/storagevolxml2xmltest.c index 742a02c90..37c92cd4f 100644 --- a/tests/storagevolxml2xmltest.c +++ b/tests/storagevolxml2xmltest.c @@ -113,7 +113,7 @@ mymain(void) DO_TEST("pool-logical", "vol-logical"); DO_TEST("pool-logical", "vol-logical-backing"); - return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE); + return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE; } VIRT_TEST_MAIN(mymain) |