[libvirt-php 3/3] Eliminated ununsed variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* src/libvirt.c: Eliminated unused variables.
---
 src/libvirt.c |   54 ++++--------------------------------------------------
 1 files changed, 4 insertions(+), 50 deletions(-)

diff --git a/src/libvirt.c b/src/libvirt.c
index 524bb6f..54b1342 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -792,11 +792,8 @@ PHP_FUNCTION(libvirt_list_storagepools)
 {
 	php_libvirt_connection *conn=NULL;
 	zval *zconn;
-	zval *zdomain;
 	int count=-1;
-	int maxids=-1;
 	int expectedcount=-1;
-	int *ids;
 	char **names;
 	int i;
 
@@ -822,7 +819,6 @@ PHP_FUNCTION(libvirt_storagepool_lookup_by_name)
 {
 	php_libvirt_connection *conn=NULL;
 	zval *zconn;
-	zval *zpool;
 	int name_len;
 	char *name=NULL;
 	virStoragePoolPtr pool=NULL;
@@ -842,9 +838,7 @@ PHP_FUNCTION(libvirt_storagepool_lookup_by_name)
 
 PHP_FUNCTION(libvirt_storagepool_list_volumes)
 {
-	php_libvirt_connection *conn=NULL;
 	php_libvirt_storagepool *pool=NULL;
-	zval *zconn;
 	zval *zpool;
 	char **names=NULL;
 	int expectedcount=-1;
@@ -895,12 +889,9 @@ PHP_FUNCTION(libvirt_storagepool_get_info)
 
 PHP_FUNCTION(libvirt_storagevolume_lookup_by_name)
 {
-	php_libvirt_connection *conn=NULL;
 	php_libvirt_storagepool *pool=NULL;
 	php_libvirt_volume *res_volume;
-	zval *zconn;
 	zval *zpool;
-	zval *zvolume;
 	int name_len;
 	char *name=NULL;
 	virStorageVolPtr volume=NULL;
@@ -980,7 +971,6 @@ PHP_FUNCTION(libvirt_list_domains)
 	zval *zconn;
 	zval *zdomain;
 	int count=-1;
-	int maxids=-1;
 	int expectedcount=-1;
 	int *ids;
 	char **names;
@@ -1042,17 +1032,11 @@ PHP_FUNCTION(libvirt_list_active_domains)
 {
 	php_libvirt_connection *conn=NULL;
 	zval *zconn;
-	zval *zdomain;
 	int count=-1;
-	int maxids=-1;
 	int expectedcount=-1;
 	int *ids;
-	char **names;
 	int i;
 
-	virDomainPtr domain=NULL;
-	php_libvirt_domain *res_domain;
-
 	GET_CONNECTION_FROM_ARGS("r",&zconn);
 
 	expectedcount=virConnectNumOfDomains (conn->conn);
@@ -1072,17 +1056,11 @@ PHP_FUNCTION(libvirt_list_defined_domains)
 {
 	php_libvirt_connection *conn=NULL;
 	zval *zconn;
-	zval *zdomain;
 	int count=-1;
-	int maxids=-1;
 	int expectedcount=-1;
-	int *ids;
 	char **names;
 	int i;
 
-	virDomainPtr domain=NULL;
-	php_libvirt_domain *res_domain;
-
 	GET_CONNECTION_FROM_ARGS("r",&zconn);
 	  
 	array_init(return_value);
@@ -1105,7 +1083,6 @@ PHP_FUNCTION(libvirt_domain_get_name)
 	php_libvirt_domain *domain=NULL;
 	zval *zdomain;
 	const char *name=NULL;
-	char *name_out;
 
 	GET_DOMAIN_FROM_ARGS("r",&zdomain);
 
@@ -1123,7 +1100,6 @@ PHP_FUNCTION(libvirt_domain_get_uuid_string)
 	php_libvirt_domain *domain=NULL;
 	zval *zdomain;
 	char *uuid;
-	char *uuid_out;
 	int retval;
 
 	GET_DOMAIN_FROM_ARGS("r",&zdomain);
@@ -1142,7 +1118,6 @@ PHP_FUNCTION(libvirt_domain_get_uuid)
 	php_libvirt_domain *domain=NULL;
 	zval *zdomain;
 	char *uuid;
-	char *uuid_out;
 	int retval;
 
 	GET_DOMAIN_FROM_ARGS("r",&zdomain);
@@ -1402,8 +1377,6 @@ PHP_FUNCTION(libvirt_domain_block_stats)
 	php_libvirt_domain *domain=NULL;
 	zval *zdomain;
 	int retval;
-	long flags=0;
-	int i;
 	char *path;
 	int path_len;
 	 	 	 
@@ -1519,15 +1492,12 @@ PHP_FUNCTION(libvirt_domain_get_network_info) {
 	php_libvirt_domain *domain=NULL;
 	zval *zdomain;
 	int retval;
-	int i;
 	char *mac;
 	char *xml;
 	char *tmp = NULL;
-	int mac_len, isFile;
+	int mac_len;
 	char fnpath[1024] = { 0 };
 
-	struct _virDomainBlockInfo info;
-
 	GET_DOMAIN_FROM_ARGS("rs",&zdomain,&mac,&mac_len);
 
 	/* Get XML for the domain */
@@ -1567,9 +1537,7 @@ PHP_FUNCTION(libvirt_list_networks)
 	zval *zconn;
 	long flags = VIR_NETWORKS_ACTIVE | VIR_NETWORKS_INACTIVE;
 	int count=-1;
-	int maxids=-1;
 	int expectedcount=-1;
-	int *ids;
 	char **names;
 	int i, done = 0;
 
@@ -1617,9 +1585,7 @@ PHP_FUNCTION(libvirt_list_nodedevs)
 	php_libvirt_connection *conn=NULL;
 	zval *zconn;
 	int count=-1;
-	int maxids=-1;
 	int expectedcount=-1;
-	int *ids;
 	char *cap = NULL;
 	char **names;
 	int i, cap_len;
@@ -1649,8 +1615,6 @@ PHP_FUNCTION(libvirt_nodedev_get)
 	zval *zconn;
 	char *name;
 	int name_len;
-	char *xml = NULL;
-	char *xml_out = NULL;
 
 	GET_CONNECTION_FROM_ARGS("rs",&zconn,&name,&name_len);
 
@@ -1672,9 +1636,8 @@ PHP_FUNCTION(libvirt_nodedev_capabilities)
 	zval *znodedev;
 	int count=-1;
 	int expectedcount=-1;
-	char *cap = NULL;
-	char **names, **names2;
-	int i, ii;
+	char **names;
+	int i;
 
 	GET_NODEDEV_FROM_ARGS("r",&znodedev);
 
@@ -1840,8 +1803,6 @@ PHP_FUNCTION(libvirt_network_get)
 	zval *zconn;
 	char *name;
 	int name_len;
-	char *xml = NULL;
-	char *xml_out = NULL;
 
 	GET_CONNECTION_FROM_ARGS("rs",&zconn,&name,&name_len);
 
@@ -2109,8 +2070,7 @@ PHP_FUNCTION(libvirt_network_get_xml)
 PHP_FUNCTION(libvirt_domain_get_block_info) {
 	php_libvirt_domain *domain=NULL;
 	zval *zdomain;
-	int retval, retval2;
-	int i;
+	int retval;
 	char *dev;
 	char *xml;
 	char *tmp = NULL;
@@ -2190,7 +2150,6 @@ PHP_FUNCTION(libvirt_domain_xml_xpath) {
 	zval *zdomain;
 	zval *zpath;
 	char *xml;
-	char *xml_out;
 	long path_len=-1, flags = 0;
 	int rc = 0;
 
@@ -2219,8 +2178,6 @@ PHP_FUNCTION(libvirt_domain_interface_stats)
 	php_libvirt_domain *domain=NULL;
 	zval *zdomain;
 	int retval;
-	long flags=0;
-	int i;
 	char *path;
 	int path_len;
 
@@ -2288,7 +2245,6 @@ PHP_FUNCTION(libvirt_domain_migrate_to_uri)
 	zval *zdomain;
 	int retval;
 	long flags=0;
-	int i;
 	char *duri;
 	int duri_len;
 	char *dname;
@@ -2316,9 +2272,7 @@ PHP_FUNCTION(libvirt_domain_migrate)
 	virDomainPtr destdomain=NULL;
 	php_libvirt_domain *res_domain;
  
-	int retval;
 	long flags=0;
-	int i;
 	char *dname;
 	int dname_len;
         long bandwith;
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]