diff options
author | Mike Pechkin <mpech@cvs.openbsd.org> | 2002-02-19 17:58:25 +0000 |
---|---|---|
committer | Mike Pechkin <mpech@cvs.openbsd.org> | 2002-02-19 17:58:25 +0000 |
commit | 210f400c2f86223b592e3c43ba8ec1e96cdeec91 (patch) | |
tree | 109abd971d986c6ddae1744d5d7920dbda9e9082 /libexec/ftpd | |
parent | d3df91e4888cbc3ca274a9659c2e7c3235c29dfd (diff) |
Rewrite upper().
millert@ ok
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpcmd.y | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index 11388f6d78e..1b596fc5594 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpcmd.y,v 1.38 2002/02/16 21:27:29 millert Exp $ */ +/* $OpenBSD: ftpcmd.y,v 1.39 2002/02/19 17:58:24 mpech Exp $ */ /* $NetBSD: ftpcmd.y,v 1.7 1996/04/08 19:03:11 jtc Exp $ */ /* @@ -47,7 +47,7 @@ #if 0 static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94"; #else -static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.38 2002/02/16 21:27:29 millert Exp $"; +static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.39 2002/02/19 17:58:24 mpech Exp $"; #endif #endif /* not lint */ @@ -1406,10 +1406,11 @@ void upper(s) char *s; { - while (*s != '\0') { - if (islower(*s)) - *s = toupper(*s); - s++; + char *p; + + for (p = s; *p; p++) { + if (islower(*p)) + *p = toupper(*p); } } |