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

[libvirt] [PATCH] maint: s/initialis/initializ/



git grep found 12 of the former but 100 of the latter in src/.

* src/remote/remote_driver.c (initialise_gnutls): Rename...
(initialize_gnutls): ...to this.
(doRemoteOpen): Adjust caller.
* src/xen/xen_driver.c (xenUnifiedOpen): Adjust output string.
* src/util/network.c: Adjust comments.
Suggested by Matthias Bolte.
---

Should be a pretty trivial conversion from British to American
English for a single word.  Is it worth adding a rule to cfg.mk
to have 'make syntax-check' diagnose future introductions of
'initialis.*'?

 src/remote/remote_driver.c |   14 +++++++-------
 src/util/network.c         |    8 ++++----
 src/xen/xen_driver.c       |    4 ++--
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 20ad6c8..d5b68dd 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -271,7 +271,7 @@ void remoteDomainEventQueueFlush(int timer, void *opaque);
 static char *get_transport_from_scheme (char *scheme);

 /* GnuTLS functions used by remoteOpen. */
-static int initialise_gnutls (virConnectPtr conn);
+static int initialize_gnutls (virConnectPtr conn);
 static gnutls_session_t negotiate_gnutls_on_connection (virConnectPtr conn, struct private_data *priv, int no_verify);

 #ifdef WITH_LIBVIRTD
@@ -425,7 +425,7 @@ doRemoteOpen (virConnectPtr conn,
         transport = trans_unix;
     }

-    /* Local variables which we will initialise. These can
+    /* Local variables which we will initialize. These can
      * get freed in the failed: path.
      */
     char *name = NULL, *command = NULL, *sockname = NULL, *netcat = NULL;
@@ -579,7 +579,7 @@ doRemoteOpen (virConnectPtr conn,
     /* Connect to the remote service. */
     switch (transport) {
     case trans_tls:
-        if (initialise_gnutls (conn) == -1) goto failed;
+        if (initialize_gnutls (conn) == -1) goto failed;
         priv->uses_tls = 1;
         priv->is_secure = 1;

@@ -1140,12 +1140,12 @@ check_cert_file(const char *type, const char *file)


 static int
-initialise_gnutls (virConnectPtr conn)
+initialize_gnutls (virConnectPtr conn)
 {
-    static int initialised = 0;
+    static int initialized = 0;
     int err;

-    if (initialised) return 0;
+    if (initialized) return 0;

     gnutls_global_init ();

@@ -1193,7 +1193,7 @@ initialise_gnutls (virConnectPtr conn)
         return -1;
     }

-    initialised = 1;
+    initialized = 1;
     return 0;
 }

diff --git a/src/util/network.c b/src/util/network.c
index 76f2791..6e24792 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -1,7 +1,7 @@
 /*
  * network.c: network helper APIs for libvirt
  *
- * Copyright (C) 2009-2009 Red Hat, Inc.
+ * Copyright (C) 2009-2010 Red Hat, Inc.
  *
  * See COPYING.LIB for the License of this software
  *
@@ -116,7 +116,7 @@ virSocketParseIpv6Addr(const char *val, virSocketAddrPtr addr) {

 /*
  * virSocketFormatAddr:
- * @addr: an initialised virSocketAddrPtr
+ * @addr: an initialized virSocketAddrPtr
  *
  * Returns a string representation of the given address
  * Returns NULL on any error
@@ -158,7 +158,7 @@ virSocketFormatAddr(virSocketAddrPtr addr) {

 /*
  * virSocketSetPort:
- * @addr: an initialised virSocketAddrPtr
+ * @addr: an initialized virSocketAddrPtr
  * @port: the port number to set
  *
  * Set the transport layer port of the given virtSocketAddr
@@ -189,7 +189,7 @@ virSocketSetPort(virSocketAddrPtr addr, int port) {

 /*
  * virSocketGetPort:
- * @addr: an initialised virSocketAddrPtr
+ * @addr: an initialized virSocketAddrPtr
  *
  * Returns the transport layer port of the given virtSocketAddr
  * Returns -1 if @addr is invalid
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 68b627a..5ab169d 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -297,7 +297,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
     }
     if (virMutexInit(&priv->lock) < 0) {
         xenUnifiedError(VIR_ERR_INTERNAL_ERROR,
-                        "%s", _("cannot initialise mutex"));
+                        "%s", _("cannot initialize mutex"));
         VIR_FREE(priv);
         return VIR_DRV_OPEN_ERROR;
     }
@@ -1892,7 +1892,7 @@ out:
 }


-/*----- Register with libvirt.c, and initialise Xen drivers. -----*/
+/*----- Register with libvirt.c, and initialize Xen drivers. -----*/

 /* The interface which we export upwards to libvirt.c. */
 static virDriver xenUnifiedDriver = {
-- 
1.6.6.1


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