From: "Daniel P. Berrange" <berrange(a)redhat.com>
The libvirt code has a mixture of data types used for the common
'i', 'j', 'k' variable names, int, unsigned int & size_t.
Change
them all to use 'size_t'. In the few cases which actually required
the use of a signed variable, either the use of the unsigned
values was eliminated or the variables were renamed to 'idx' to
better describe their use.
At the same time any loop variables name 'ii', 'jj', 'kk' were
changed to their more normal names 'i', 'j', 'k'.
New syntax-check rules prevent regressions in these conversions.
Daniel P. Berrange (32):
Convert 'int i' to 'size_t i' in daemon/ files
Convert 'int i' to 'size_t i' in src/conf/ files
Convert 'int i' to 'size_t i' in src/util/ files
Convert 'int i' to 'size_t i' in tests/ files
Convert 'int i' to 'size_t i' in tools/ files
Convert 'int i' to 'size_t i' in src/{xen,xenapi,xenxs} files
Convert 'int i' to 'size_t i' in src/{esx,vmx,vmware} files
Convert 'int i' to 'size_t i' in src/storage/ files
Convert 'int i' to 'size_t i' in src/vbox/ files
Convert 'int i' to 'size_t i' in src/uml/ files
Convert 'int i' to 'size_t i' in src/test/ files
Convert 'int i' to 'size_t i' in src/security files
Convert 'int i' to 'size_t i' in src/secret/ files
Convert 'int i' to 'size_t i' in src/rpc/ files
Convert 'int i' to 'size_t i' in src/remote/ files
Convert 'int i' to 'size_t i' in src/qemu files
Convert 'int i' to 'size_t i' in src/phyp/ files
Convert 'int i' to 'size_t i' in src/parallels/ files
Convert 'int i' to 'size_t i' in src/openvz/ files
Convert 'int i' to 'size_t i' in src/nwfilter/ files
Convert 'int i' to 'size_t i' in src/node_device/ files
Convert 'int i' to 'size_t i' in src/lxc/ files
Convert 'int i' to 'size_t i' in src/locking/ files
Convert 'int i' to 'size_t i' in src/libxl/ files
Convert 'int i' to 'size_t i' in src/network/ files
Convert 'int i' to 'size_t i' in src/interface/ files
Convert 'int i' to 'size_t i' in src/hyperv/ files
Convert 'int i' to 'size_t i' in src/cpu/ files
Convert 'int i' to 'size_t i' in src/ files
Convert 'int i' to 'size_t i' in python/ files
Convert 'int i' to 'size_t i' in examples/ files
Prevent use of 'int' data type & 'ii', 'jj', 'kk'
var names for loops
cfg.mk | 14 ++
daemon/libvirtd-config.c | 5 +-
daemon/remote.c | 55 ++---
examples/domain-events/events-c/event-test.c | 2 +-
examples/domsuspend/suspend.c | 14 +-
examples/openauth/openauth.c | 2 +-
python/libvirt-lxc-override.c | 2 +-
python/libvirt-override.c | 111 ++++++----
src/conf/capabilities.c | 32 +--
src/conf/cpu_conf.c | 18 +-
src/conf/domain_audit.c | 4 +-
src/conf/domain_conf.c | 266 +++++++++++-----------
src/conf/domain_conf.h | 12 +-
src/conf/domain_event.c | 24 +-
src/conf/domain_nwfilter.c | 2 +-
src/conf/interface_conf.c | 73 +++---
src/conf/netdev_vlan_conf.c | 19 +-
src/conf/network_conf.c | 319 ++++++++++++++-------------
src/conf/node_device_conf.c | 27 ++-
src/conf/nwfilter_conf.c | 43 ++--
src/conf/nwfilter_params.c | 26 ++-
src/conf/snapshot_conf.c | 21 +-
src/conf/storage_conf.c | 42 ++--
src/conf/storage_encryption_conf.c | 3 +-
src/cpu/cpu.c | 22 +-
src/cpu/cpu_generic.c | 6 +-
src/cpu/cpu_powerpc.c | 2 +-
src/cpu/cpu_x86.c | 26 +--
src/esx/esx_driver.c | 10 +-
src/esx/esx_interface_driver.c | 2 +-
src/esx/esx_network_driver.c | 4 +-
src/esx/esx_storage_backend_iscsi.c | 4 +-
src/esx/esx_storage_backend_vmfs.c | 4 +-
src/esx/esx_storage_driver.c | 10 +-
src/esx/esx_util.c | 2 +-
src/esx/esx_vi.c | 18 +-
src/fdstream.c | 2 +-
src/hyperv/hyperv_driver.c | 4 +-
src/hyperv/hyperv_util.c | 2 +-
src/interface/interface_backend_netcf.c | 6 +-
src/interface/interface_backend_udev.c | 4 +-
src/libvirt-lxc.c | 2 +-
src/libvirt.c | 40 ++--
src/libxl/libxl_conf.c | 12 +-
src/libxl/libxl_driver.c | 34 +--
src/locking/domain_lock.c | 6 +-
src/locking/lock_driver.h | 2 +-
src/locking/lock_driver_lockd.c | 6 +-
src/locking/lock_driver_sanlock.c | 10 +-
src/locking/lock_manager.c | 4 +-
src/lxc/lxc_cgroup.c | 3 +-
src/lxc/lxc_container.c | 6 +-
src/lxc/lxc_controller.c | 3 +-
src/lxc/lxc_driver.c | 44 ++--
src/lxc/lxc_process.c | 2 +-
src/network/bridge_driver.c | 281 +++++++++++------------
src/node_device/node_device_driver.c | 6 +-
src/node_device/node_device_hal.c | 9 +-
src/nodeinfo.c | 24 +-
src/nwfilter/nwfilter_driver.c | 5 +-
src/nwfilter/nwfilter_ebiptables_driver.c | 4 +-
src/nwfilter/nwfilter_gentech_driver.c | 21 +-
src/openvz/openvz_driver.c | 10 +-
src/parallels/parallels_driver.c | 15 +-
src/parallels/parallels_network.c | 3 +-
src/parallels/parallels_storage.c | 8 +-
src/phyp/phyp_driver.c | 26 +--
src/qemu/qemu_agent.c | 9 +-
src/qemu/qemu_capabilities.c | 7 +-
src/qemu/qemu_cgroup.c | 12 +-
src/qemu/qemu_command.c | 104 ++++-----
src/qemu/qemu_conf.c | 2 +-
src/qemu/qemu_domain.c | 34 +--
src/qemu/qemu_driver.c | 120 +++++-----
src/qemu/qemu_hostdev.c | 26 ++-
src/qemu/qemu_hotplug.c | 54 ++---
src/qemu/qemu_migration.c | 25 ++-
src/qemu/qemu_monitor.c | 13 +-
src/qemu/qemu_monitor_json.c | 31 +--
src/qemu/qemu_monitor_text.c | 6 +-
src/qemu/qemu_process.c | 48 ++--
src/remote/remote_driver.c | 64 +++---
src/rpc/gendispatch.pl | 7 +-
src/rpc/virnetclient.c | 2 +-
src/rpc/virnetclientprogram.c | 2 +-
src/rpc/virnetserver.c | 10 +-
src/rpc/virnetserverservice.c | 10 +-
src/rpc/virnetsocket.c | 2 +-
src/rpc/virnetsshsession.c | 10 +-
src/rpc/virnettlscontext.c | 7 +-
src/secret/secret_driver.c | 6 +-
src/security/security_dac.c | 4 +-
src/security/security_driver.c | 2 +-
src/security/security_selinux.c | 4 +-
src/security/virt-aa-helper.c | 4 +-
src/storage/storage_backend.c | 8 +-
src/storage/storage_backend_disk.c | 6 +-
src/storage/storage_backend_fs.c | 2 +-
src/storage/storage_backend_iscsi.c | 2 +-
src/storage/storage_backend_logical.c | 10 +-
src/storage/storage_backend_rbd.c | 4 +-
src/storage/storage_driver.c | 19 +-
src/test/test_driver.c | 50 +++--
src/uml/uml_conf.c | 6 +-
src/uml/uml_driver.c | 9 +-
src/util/virbitmap.c | 13 +-
src/util/vircgroup.c | 32 +--
src/util/vircommand.c | 10 +-
src/util/virdnsmasq.c | 16 +-
src/util/virebtables.c | 8 +-
src/util/vireventpoll.c | 28 +--
src/util/virhook.c | 3 +-
src/util/virjson.c | 12 +-
src/util/virkeycode.c | 4 +-
src/util/virlog.c | 30 +--
src/util/virlog.h | 2 +-
src/util/virmacaddr.c | 2 +-
src/util/virnetdevmacvlan.c | 2 +-
src/util/virnetdevopenvswitch.c | 2 +-
src/util/virnetdevtap.c | 4 +-
src/util/virnetdevvportprofile.c | 2 +-
src/util/virnetlink.c | 14 +-
src/util/virnuma.c | 13 +-
src/util/virpci.c | 14 +-
src/util/virportallocator.c | 8 +-
src/util/virprocess.c | 7 +-
src/util/virscsi.c | 6 +-
src/util/virsocketaddr.c | 28 +--
src/util/virstoragefile.c | 7 +-
src/util/virstring.c | 3 +-
src/util/virsysinfo.c | 6 +-
src/util/virthreadwin32.c | 6 +-
src/util/virthreadwin32.h | 2 +-
src/util/virtypedparam.c | 10 +-
src/util/viruri.c | 2 +-
src/util/virusb.c | 6 +-
src/util/virutil.c | 29 +--
src/util/viruuid.c | 7 +-
src/vbox/vbox_XPCOMCGlue.c | 6 +-
src/vbox/vbox_tmpl.c | 159 ++++++-------
src/vmware/vmware_conf.c | 4 +-
src/vmx/vmx.c | 24 +-
src/xen/block_stats.c | 4 +-
src/xen/xen_driver.c | 4 +-
src/xen/xen_hypervisor.c | 14 +-
src/xen/xen_inotify.c | 4 +-
src/xen/xend_internal.c | 12 +-
src/xen/xm_internal.c | 5 +-
src/xen/xs_internal.c | 27 ++-
src/xenapi/xenapi_driver.c | 30 ++-
src/xenapi/xenapi_utils.c | 14 +-
src/xenxs/xen_sxpr.c | 10 +-
src/xenxs/xen_xm.c | 6 +-
tests/commandhelper.c | 4 +-
tests/cputest.c | 6 +-
tests/esxutilstest.c | 9 +-
tests/eventtest.c | 14 +-
tests/nodeinfotest.c | 2 +-
tests/openvzutilstest.c | 2 +-
tests/qemuhelptest.c | 6 +-
tests/qemumonitorjsontest.c | 6 +-
tests/qemumonitortest.c | 4 +-
tests/ssh.c | 2 +-
tests/testutils.c | 13 +-
tests/utiltest.c | 16 +-
tests/viratomictest.c | 4 +-
tests/virbitmaptest.c | 9 +-
tests/vircgrouptest.c | 2 +-
tests/virhashtest.c | 12 +-
tests/virnetsockettest.c | 2 +-
tests/virstoragetest.c | 2 +-
tools/virsh-domain-monitor.c | 17 +-
tools/virsh-domain.c | 41 ++--
tools/virsh-host.c | 8 +-
tools/virsh-interface.c | 6 +-
tools/virsh-network.c | 6 +-
tools/virsh-nodedev.c | 8 +-
tools/virsh-nwfilter.c | 6 +-
tools/virsh-pool.c | 7 +-
tools/virsh-secret.c | 6 +-
tools/virsh-snapshot.c | 12 +-
tools/virsh-volume.c | 6 +-
tools/virsh.c | 15 +-
183 files changed, 1854 insertions(+), 1651 deletions(-)
--
1.8.1.4