]> git.proxmox.com Git - mirror_lxc.git/commitdiff
clang: Fix some simple issues
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 24 Oct 2013 01:42:42 +0000 (21:42 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 24 Oct 2013 01:42:42 +0000 (21:42 -0400)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/confile.c
src/lxc/lxc_monitord.c
src/lxc/monitor.c
src/lxc/version.c
src/lxc/version.h

index 106ed4fce32203b67a48483fff82586b8a8dc804..680d26080be676ddec8272ef376de1e264501ee8 100644 (file)
@@ -901,7 +901,7 @@ static int config_hook(const char *key, const char *value,
        return -1;
 }
 
-static int config_personality(const char *key, const const char *value,
+static int config_personality(const char *key, const char *value,
                              struct lxc_conf *lxc_conf)
 {
        signed long personality = lxc_config_parse_arch(value);
index 404934588c4b7bf92da8af07b15bd872c8c66c33..fdc80c5fdacdbaae24c459dae767a3428537072e 100644 (file)
@@ -47,8 +47,6 @@
 
 lxc_log_define(lxc_monitord, lxc);
 
-static struct lxc_monitor mon;
-
 static void lxc_monitord_cleanup(void);
 
 /*
@@ -71,6 +69,8 @@ struct lxc_monitor {
        struct lxc_epoll_descr descr;
 };
 
+static struct lxc_monitor mon;
+
 static int lxc_monitord_fifo_create(struct lxc_monitor *mon)
 {
        char fifo_path[PATH_MAX];
@@ -379,7 +379,8 @@ int main(int argc, char *argv[])
         * if-empty-statement construct is to quiet the
         * warn-unused-result warning.
         */
-       if (write(pipefd, "S", 1)) ;
+       if (write(pipefd, "S", 1))
+               ;
        close(pipefd);
 
        if (lxc_monitord_mainloop_add(&mon)) {
index e736937c406d52503714ae39977d9e86d3075748..ab567c81b0fe372a285a850e13ec22ada6ebc0ae 100644 (file)
@@ -328,7 +328,8 @@ int lxc_monitord_spawn(const char *lxcpath)
                 * synced with the child process. the if-empty-statement
                 * construct is to quiet the warn-unused-result warning.
                 */
-               if (read(pipefd[0], &c, 1)) ;
+               if (read(pipefd[0], &c, 1))
+                       ;
                close(pipefd[0]);
                exit(EXIT_SUCCESS);
        }
index c47d5520e3455d75a2cffd5c13b52903797cc2a6..bfa34bdb06f8431569e07a94300824566eebf31a 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "../config.h"
 
-const char const* lxc_version(void)
+const char *lxc_version(void)
 {
        return PACKAGE_VERSION;
 }
index a88ffad422f546d1b3c42a85c89c7113c8f73b0d..e2b0fc4c2c773c1e78e486f60bd320c3360864fe 100644 (file)
@@ -26,6 +26,6 @@
 /*
  * Returns the version number of the library
  */
-extern const char const *lxc_version(void);
+extern const char *lxc_version(void);
 
 #endif