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

[Libvir] [PATCH] TODO macro shouldn't contain a semicolon



I don't think it's a good idea for macros which look like statements to behave differently from actual statements. This patch fixes the TODO macro in this way.

Rich.

--
Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421
 "[Negative numbers] darken the very whole doctrines of the equations
 and make dark of the things which are in their nature excessively
 obvious and simple" (Francis Maseres FRS, mathematician, 1759)
diff -urN --exclude=CVS --exclude=.git --exclude='*.pem' --exclude=demoCA --exclude=.gitignore --exclude='*.orig' --exclude='*.bak' libvirt-cvs/src/internal.h libvirt-todo/src/internal.h
--- libvirt-cvs/src/internal.h	2007-03-16 15:22:52.000000000 +0000
+++ libvirt-todo/src/internal.h	2007-03-16 15:22:51.000000000 +0000
@@ -62,7 +62,7 @@
  */
 #define TODO 								\
     fprintf(stderr, "Unimplemented block at %s:%d\n",			\
-            __FILE__, __LINE__);
+            __FILE__, __LINE__)
 
 /**
  * VIR_CONNECT_MAGIC:
diff -urN --exclude=CVS --exclude=.git --exclude='*.pem' --exclude=demoCA --exclude=.gitignore --exclude='*.orig' --exclude='*.bak' libvirt-cvs/src/libvirt.c libvirt-todo/src/libvirt.c
--- libvirt-cvs/src/libvirt.c	2007-03-16 11:04:46.000000000 +0000
+++ libvirt-todo/src/libvirt.c	2007-03-16 14:28:39.000000000 +0000
@@ -1505,7 +1505,7 @@
     virConnectPtr conn;
 
     if (domain == NULL) {
-        TODO
+        TODO;
 	return (-1);
     }
     if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
@@ -1559,8 +1559,8 @@
     virConnectPtr conn;
 
     if (domain == NULL) {
-        TODO
-	return (-1);
+        TODO;
+        return (-1);
     }
     if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
         virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
@@ -1908,8 +1908,8 @@
     int i, ret = -1;
     virConnectPtr conn;
     if (domain == NULL) {
-        TODO
-	return (-1);
+        TODO;
+        return (-1);
     }
     if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
         virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
@@ -2017,8 +2017,8 @@
     virConnectPtr conn;
 
     if (domain == NULL) {
-        TODO
-	return (-1);
+        TODO;
+        return (-1);
     }
     if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
         virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
@@ -2086,8 +2086,8 @@
     virConnectPtr conn;
 
     if (domain == NULL) {
-        TODO
-	return (-1);
+        TODO;
+        return (-1);
     }
     if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
         virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
@@ -2149,8 +2149,8 @@
     virConnectPtr conn;
 
     if (domain == NULL) {
-        TODO
-	return (-1);
+        TODO;
+        return (-1);
     }
     if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
         virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
@@ -2696,8 +2696,8 @@
     int i, ret = -1;
     virConnectPtr conn;
     if (network == NULL) {
-        TODO
-	return (-1);
+        TODO;
+        return (-1);
     }
     if (!VIR_IS_CONNECTED_NETWORK(network)) {
         virLibNetworkError(network, VIR_ERR_INVALID_NETWORK, __FUNCTION__);
diff -urN --exclude=CVS --exclude=.git --exclude='*.pem' --exclude=demoCA --exclude=.gitignore --exclude='*.orig' --exclude='*.bak' libvirt-cvs/src/proxy_internal.c libvirt-todo/src/proxy_internal.c
--- libvirt-cvs/src/proxy_internal.c	2007-03-16 11:04:46.000000000 +0000
+++ libvirt-todo/src/proxy_internal.c	2007-03-16 14:28:39.000000000 +0000
@@ -476,8 +476,8 @@
 	return(-1);
     }
     if (res->serial != serial) {
-        TODO /* Asynchronous communication */
-	fprintf(stderr, _("got asynchronous packet number %d\n"), res->serial);
+        TODO; /* Asynchronous communication */
+        fprintf(stderr, _("got asynchronous packet number %d\n"), res->serial);
         goto retry;
     }
     return(0);
diff -urN --exclude=CVS --exclude=.git --exclude='*.pem' --exclude=demoCA --exclude=.gitignore --exclude='*.orig' --exclude='*.bak' libvirt-cvs/src/xmlrpc.c libvirt-todo/src/xmlrpc.c
--- libvirt-cvs/src/xmlrpc.c	2007-02-14 15:40:54.000000000 +0000
+++ libvirt-todo/src/xmlrpc.c	2007-03-16 13:55:45.000000000 +0000
@@ -86,7 +86,7 @@
 static xmlRpcValuePtr xmlRpcValueUnmarshalDateTime(xmlNodePtr node ATTRIBUTE_UNUSED)
 {
     /* we don't need this */
-    TODO
+    TODO;
     return NULL;
 }
 
@@ -102,7 +102,7 @@
 static xmlRpcValuePtr xmlRpcValueUnmarshalBase64(xmlNodePtr node ATTRIBUTE_UNUSED)
 {
     /* we don't need this */
-    TODO
+    TODO;
     return NULL;
 }
 
@@ -346,11 +346,11 @@
 	break;
     case XML_RPC_DATE_TIME:
 	/* FIXME */
-	TODO
+    TODO;
 	break;
     case XML_RPC_BASE64:
 	/* FIXME */
-	TODO
+    TODO;
 	break;
     case XML_RPC_STRING:
 	virBufferStrcat(buf, 
@@ -694,3 +694,17 @@
 {
     return context->faultMessage;
 }
+
+/*
+ * vim: set tabstop=4:
+ * vim: set shiftwidth=4:
+ * vim: set expandtab:
+ */
+/*
+ * Local variables:
+ *  indent-tabs-mode: nil
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 4
+ * End:
+ */

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


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