libvirt/src/cpu
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
..
cpu_generic.c Rename hash.h and hash.c to virhash.h and virhash.c 2012-01-26 14:11:13 +00:00
cpu_generic.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
cpu_map.c maint: rename virBufferVSprintf to virBufferAsprintf 2011-05-05 13:47:40 -06:00
cpu_map.h cpu: Add support for overriding path to CPU map XML file 2010-12-01 14:12:54 +01:00
cpu_map.xml Cpu mapping cleanup 2012-03-19 11:20:38 -06:00
cpu_powerpc.c Add PPC cpu driver. 2011-11-30 12:38:17 -07:00
cpu_powerpc.h Add PPC cpu driver. 2011-11-30 12:38:17 -07:00
cpu_x86_data.h cpu: Unify CPUID data structures 2010-12-14 11:12:58 +01:00
cpu_x86.c Cleanup for a return statement in source files 2012-03-26 14:45:22 -06:00
cpu_x86.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
cpu.c build: prohibit raw malloc and free 2012-02-03 10:41:45 -07:00
cpu.h Remove virConnectPtr from virRaiseErrorFull 2011-04-17 07:22:23 +02:00