diff options
author | obrien <obrien@FreeBSD.org> | 2002-03-30 08:51:21 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-03-30 08:51:21 +0000 |
commit | 0a4573eea0879c6425861370fe1e2d8a7ab92633 (patch) | |
tree | 976f4ba2c15cb6ce6ee627495d9ab302cbdb11d9 | |
parent | dd7885b88d86945bdfa6cda1778915c71dbdb7e5 (diff) | |
download | FreeBSD-src-0a4573eea0879c6425861370fe1e2d8a7ab92633.zip FreeBSD-src-0a4573eea0879c6425861370fe1e2d8a7ab92633.tar.gz |
Const what I could on a first pass.
-rw-r--r-- | usr.bin/rsh/rsh.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c index 8a7a62e..44a4e95 100644 --- a/usr.bin/rsh/rsh.c +++ b/usr.bin/rsh/rsh.c @@ -87,7 +87,7 @@ int rfd2; int family = PF_UNSPEC; char rlogin[] = "rlogin"; -char *copyargs(char **); +char *copyargs(char * const *); void sendsig(int); void talk(int, long, pid_t, int, int); void usage(void); @@ -95,8 +95,8 @@ void usage(void); int main(int argc, char *argv[]) { - struct passwd *pw; - struct servent *sp; + struct passwd const *pw; + struct servent const *sp; long omask; int argoff, asrsh, ch, dflag, nflag, one, rem; pid_t pid = 0; @@ -104,7 +104,7 @@ main(int argc, char *argv[]) char *args, *host, *p, *user; int timeout = 0; #ifdef KERBEROS - char *k; + const char *k; #endif argoff = asrsh = dflag = nflag = 0; @@ -338,7 +338,8 @@ talk(int nflag, long omask, pid_t pid, int rem, int timeout) { int cc, wc; fd_set readfrom, ready, rembits; - char *bp, buf[BUFSIZ]; + char buf[BUFSIZ]; + const char *bp; struct timeval tvtimeout; int nfds, srval; @@ -459,10 +460,11 @@ sendsig(int sig) } char * -copyargs(char **argv) +copyargs(char * const *argv) { int cc; - char **ap, *args, *p; + char *args, *p; + char * const *ap; cc = 0; for (ap = argv; *ap; ++ap) |