Code

vserver plugin: constify
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 5 Mar 2016 15:42:24 +0000 (16:42 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 5 Mar 2016 15:42:24 +0000 (16:42 +0100)
src/vserver.c

index bd2e867384870ef7212af60d88d678b21bdd3db5..6c09f439b1a157e1c8b29d41796fa0f4b0ef3b22 100644 (file)
@@ -215,7 +215,7 @@ static int vserver_read (void)
                {
                        derive_t rx;
                        derive_t tx;
-                       char *type_instance;
+                       const char *type_instance;
 
                        if (strsplit (buffer, cols, 4) < 4)
                                continue;
@@ -265,7 +265,7 @@ static int vserver_read (void)
 
                        if (2 == n)
                        {
-                               char   *type_instance;
+                               const char *type_instance;
                                gauge_t value;
 
                                if (0 == strcmp (cols[0], "nr_threads:"))
@@ -314,8 +314,8 @@ static int vserver_read (void)
 
                while ((fh != NULL) && (NULL != fgets (buffer, BUFSIZE, fh)))
                {
-                       char *type = "vs_memory";
-                       char *type_instance;
+                       const char *type = "vs_memory";
+                       const char *type_instance;
                        gauge_t value;
 
                        if (strsplit (buffer, cols, 2) < 2)