diff options
author | Eric W. Biederman | 2013-01-17 01:35:12 +0100 |
---|---|---|
committer | Karel Zak | 2013-01-17 13:17:45 +0100 |
commit | f9bbdea6e144d7b6b2c6b5e3468265ec8220535d (patch) | |
tree | 93f2a16cdf529022660f8ed8fc66ba95fe297289 /sys-utils/nsenter.c | |
parent | nsenter: Properly spell significant in a comment. (diff) | |
download | kernel-qcow2-util-linux-f9bbdea6e144d7b6b2c6b5e3468265ec8220535d.tar.gz kernel-qcow2-util-linux-f9bbdea6e144d7b6b2c6b5e3468265ec8220535d.tar.xz kernel-qcow2-util-linux-f9bbdea6e144d7b6b2c6b5e3468265ec8220535d.zip |
nsenter: Add const to declarations where possible.
Make it clear where functions do not modify their arguments.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'sys-utils/nsenter.c')
-rw-r--r-- | sys-utils/nsenter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c index aef0d933a..76e942df1 100644 --- a/sys-utils/nsenter.c +++ b/sys-utils/nsenter.c @@ -60,7 +60,7 @@ static int setns(int fd, int nstype) static struct namespace_file{ int nstype; - char *name; + const char *name; int fd; } namespace_files[] = { /* Careful the order is significant in this array. @@ -109,7 +109,7 @@ static pid_t namespace_target_pid = 0; static int root_fd = -1; static int wd_fd = -1; -static void open_target_fd(int *fd, const char *type, char *path) +static void open_target_fd(int *fd, const char *type, const char *path) { char pathbuf[PATH_MAX]; @@ -130,7 +130,7 @@ static void open_target_fd(int *fd, const char *type, char *path) err(EXIT_FAILURE, _("open of '%s' failed"), path); } -static void open_namespace_fd(int nstype, char *path) +static void open_namespace_fd(int nstype, const char *path) { struct namespace_file *nsfile; |