diff options
author | jilles <jilles@FreeBSD.org> | 2014-03-14 21:45:37 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2014-03-14 21:45:37 +0000 |
commit | eeed81169f15bfde49ac6706ec6fdd8fe607e86f (patch) | |
tree | 03f46856e63bbe8ea40cb7c07bcaba85b943815a | |
parent | 79059ce446fd88058babca9eb9b0b3ff2c9e4424 (diff) | |
download | FreeBSD-src-eeed81169f15bfde49ac6706ec6fdd8fe607e86f.zip FreeBSD-src-eeed81169f15bfde49ac6706ec6fdd8fe607e86f.tar.gz |
sh: Add some consts.
-rw-r--r-- | bin/sh/expand.c | 10 | ||||
-rw-r--r-- | bin/sh/jobs.c | 8 | ||||
-rw-r--r-- | bin/sh/redir.c | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index 6ef9b0e..6c8b023 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -104,8 +104,8 @@ static char *expari(char *); static void expbackq(union node *, int, int); static int subevalvar(char *, char *, int, int, int, int, int); static char *evalvar(char *, int); -static int varisset(char *, int); -static void varvalue(char *, int, int, int); +static int varisset(const char *, int); +static void varvalue(const char *, int, int, int); static void recordregion(int, int, int); static void removerecordregions(int); static void ifsbreakup(char *, struct arglist *); @@ -633,7 +633,7 @@ evalvar(char *p, int flag) int subtype; int varflags; char *var; - char *val; + const char *val; int patloc; int c; int set; @@ -827,7 +827,7 @@ record: */ static int -varisset(char *name, int nulok) +varisset(const char *name, int nulok) { if (*name == '!') @@ -876,7 +876,7 @@ strtodest(const char *p, int flag, int subtype, int quoted) */ static void -varvalue(char *name, int quoted, int subtype, int flag) +varvalue(const char *name, int quoted, int subtype, int flag) { int num; char *p; diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index 6e7791c..9913a28 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -95,9 +95,9 @@ static void restartjob(struct job *); #endif static void freejob(struct job *); static int waitcmdloop(struct job *); -static struct job *getjob_nonotfound(char *); -static struct job *getjob(char *); pid_t getjobpgrp(char *); +static struct job *getjob_nonotfound(const char *); +static struct job *getjob(const char *); static pid_t dowait(int, struct job *); static void checkzombies(void); static void cmdtxt(union node *); @@ -558,7 +558,7 @@ jobidcmd(int argc __unused, char **argv __unused) */ static struct job * -getjob_nonotfound(char *name) +getjob_nonotfound(const char *name) { int jobno; struct job *found, *jp; @@ -628,7 +628,7 @@ currentjob: if ((jp = getcurjob(NULL)) == NULL) static struct job * -getjob(char *name) +getjob(const char *name) { struct job *jp; diff --git a/bin/sh/redir.c b/bin/sh/redir.c index 79728a0..647b10a 100644 --- a/bin/sh/redir.c +++ b/bin/sh/redir.c @@ -152,7 +152,7 @@ openredirect(union node *redir, char memory[10]) { struct stat sb; int fd = redir->nfile.fd; - char *fname; + const char *fname; int f; int e; @@ -250,7 +250,7 @@ movefd: static int openhere(union node *redir) { - char *p; + const char *p; int pip[2]; size_t len = 0; int flags; |