libvirt/examples
Martin Kletzander 9943276fd2 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_'
2012-03-26 14:45:22 -06:00
..
apparmor maint: add missing copyright notices 2011-07-28 15:01:17 -06:00
domain-events qemu: Update domain status to running while wakeup event is emitted 2012-03-23 23:12:29 +08:00
dominfo Cleanup for a return statement in source files 2012-03-26 14:45:22 -06:00
domsuspend Cleanup for a return statement in source files 2012-03-26 14:45:22 -06:00
hellolibvirt maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
openauth maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
python maint: add missing copyright notices 2011-07-28 15:01:17 -06:00
systemtap Permission change for systemtap examples. 2012-01-17 15:42:01 -07:00
xml nwfilter: fix typing error in filter 2012-01-17 12:47:41 -05:00