From b15d771a56881219c8ab8b085ebb0bf5c2c527ef Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Thu, 30 Jun 2016 12:03:27 +0800 Subject: [PATCH] add const to container id in hyper_find_container() Signed-off-by: Lai Jiangshan --- src/container.c | 2 +- src/container.h | 2 +- src/hyper.h | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/container.c b/src/container.c index 1d780af..011e42f 100644 --- a/src/container.c +++ b/src/container.c @@ -769,7 +769,7 @@ fail: return -1; } -struct hyper_container *hyper_find_container(struct hyper_pod *pod, char *id) +struct hyper_container *hyper_find_container(struct hyper_pod *pod, const char *id) { struct hyper_container *c; diff --git a/src/container.h b/src/container.h index 86cf459..ec7406c 100644 --- a/src/container.h +++ b/src/container.h @@ -55,7 +55,7 @@ struct hyper_pod; int hyper_start_container(struct hyper_container *container, int utsns, int ipcns, struct hyper_pod *pod); -struct hyper_container *hyper_find_container(struct hyper_pod *pod, char *id); +struct hyper_container *hyper_find_container(struct hyper_pod *pod, const char *id); void hyper_cleanup_container(struct hyper_container *container, struct hyper_pod *pod); void hyper_cleanup_containers(struct hyper_pod *pod); void hyper_free_container(struct hyper_container *c); diff --git a/src/hyper.h b/src/hyper.h index ae7dd73..681b318 100644 --- a/src/hyper.h +++ b/src/hyper.h @@ -125,7 +125,6 @@ static inline int hyper_create(char *hyper_path) int hyper_create_file(const char *hyper_path); int hyper_mkdir(char *hyper_path); int hyper_open_serial(char *tty); -struct hyper_container *hyper_find_container(struct hyper_pod *pod, char *id); int hyper_start_containers(struct hyper_pod *pod); void hyper_cleanup_pod(struct hyper_pod *pod);