Commit 0b98289e by Andrey Mazo Committed by Serge Hallyn

Bring static and const to tests too

parent 74a3920a
...@@ -332,7 +332,7 @@ out1: ...@@ -332,7 +332,7 @@ out1:
} }
int test_attach(const char *lxcpath, const char *name, const char *template) static int test_attach(const char *lxcpath, const char *name, const char *template)
{ {
int ret = -1; int ret = -1;
struct lxc_container *ct; struct lxc_container *ct;
......
...@@ -33,7 +33,7 @@ static int quiet = 0; ...@@ -33,7 +33,7 @@ static int quiet = 0;
static int delay = 0; static int delay = 0;
static const char *template = "busybox"; static const char *template = "busybox";
static struct option options[] = { static const struct option options[] = {
{ "threads", required_argument, NULL, 'j' }, { "threads", required_argument, NULL, 'j' },
{ "iterations", required_argument, NULL, 'i' }, { "iterations", required_argument, NULL, 'i' },
{ "template", required_argument, NULL, 't' }, { "template", required_argument, NULL, 't' },
...@@ -63,7 +63,7 @@ static void usage(void) { ...@@ -63,7 +63,7 @@ static void usage(void) {
struct thread_args { struct thread_args {
int thread_id; int thread_id;
int return_code; int return_code;
char *mode; const char *mode;
}; };
static void do_function(void *arguments) static void do_function(void *arguments)
......
...@@ -80,7 +80,7 @@ static void test_list_func(const char *lxcpath, const char *type, ...@@ -80,7 +80,7 @@ static void test_list_func(const char *lxcpath, const char *type,
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
char *lxcpath = NULL; const char *lxcpath = NULL;
if (argc > 1) if (argc > 1)
lxcpath = argv[1]; lxcpath = argv[1];
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define mycontainername "lxctest.sem" #define mycontainername "lxctest.sem"
#define TIMEOUT_SECS 3 #define TIMEOUT_SECS 3
void test_two_locks(void) static void test_two_locks(void)
{ {
struct lxc_lock *l; struct lxc_lock *l;
pid_t pid; pid_t pid;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <lxc/lxccontainer.h> #include <lxc/lxccontainer.h>
void usage(char *me) static void usage(const char *me)
{ {
printf("Usage: %s name [lxcpath]\n", me); printf("Usage: %s name [lxcpath]\n", me);
exit(0); exit(0);
...@@ -29,7 +29,7 @@ void usage(char *me) ...@@ -29,7 +29,7 @@ void usage(char *me)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
char *lxcpath = NULL, *name; const char *lxcpath = NULL, *name;
bool may = false; bool may = false;
struct lxc_container *c; struct lxc_container *c;
......
...@@ -42,7 +42,7 @@ static int do_reboot(void *arg) ...@@ -42,7 +42,7 @@ static int do_reboot(void *arg)
return 0; return 0;
} }
int test_reboot(int cmd, int sig) static int test_reboot(int cmd, int sig)
{ {
long stack_size = 4096; long stack_size = 4096;
void *stack = alloca(stack_size) + stack_size; void *stack = alloca(stack_size) + stack_size;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define MYNAME "snapxxx1" #define MYNAME "snapxxx1"
#define RESTNAME "snapxxx2" #define RESTNAME "snapxxx2"
void try_to_remove() static void try_to_remove(void)
{ {
struct lxc_container *c; struct lxc_container *c;
char snappath[1024]; char snappath[1024];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment