]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
nsenter: Add const to declarations where possible.
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 17 Jan 2013 00:35:12 +0000 (16:35 -0800)
committerKarel Zak <kzak@redhat.com>
Thu, 17 Jan 2013 12:17:45 +0000 (13:17 +0100)
Make it clear where functions do not modify their arguments.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
sys-utils/nsenter.c

index aef0d933a9759c242e5812e807ad8f16c4d25785..76e942df19332586e20f990edb1e19c5c2e57033 100644 (file)
@@ -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;