diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-19 19:54:43 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-19 19:54:43 +0000 |
commit | 4ffaad8c33eea799dc843f5b07cca7c433ea0b6d (patch) | |
tree | bc0ad6a6e965fc0603c564f2179f0fa8aea53cdc /openbsd-compat/getcwd.c | |
parent | 7387fdb6b58b8ba26e1ec7f476d2a5b57236bae1 (diff) |
- (bal) Fix mixed up params to memmove() from Jan 5th in setenv.c and
getcwd.c.
Diffstat (limited to 'openbsd-compat/getcwd.c')
-rw-r--r-- | openbsd-compat/getcwd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsd-compat/getcwd.c b/openbsd-compat/getcwd.c index 273a0487..de3baccb 100644 --- a/openbsd-compat/getcwd.c +++ b/openbsd-compat/getcwd.c @@ -119,7 +119,7 @@ getcwd(char *pt,size_t size) * path to the beginning of the buffer, but it's always * been that way and stuff would probably break. */ - memmove(bpt, pt, ept - bpt); + memmove(pt, bpt, ept - bpt); free(up); return (pt); } @@ -170,7 +170,7 @@ getcwd(char *pt,size_t size) goto notfound; if (ISDOT(dp)) continue; - memmove(dp->d_name, bup, dp->d_namlen + 1); + memmove(bup, dp->d_name, dp->d_namlen + 1); /* Save the first error for later. */ if (lstat(up, &s)) { @@ -202,13 +202,13 @@ getcwd(char *pt,size_t size) pt = npt; bpt = pt + off; ept = pt + ptsize; - memmove(bpt, ept - len, len); + memmove(ept - len, bpt, len); bpt = ept - len; } if (!first) *--bpt = '/'; bpt -= dp->d_namlen; - memmove(dp->d_name, bpt, dp->d_namlen); + memmove(bpt, dp->d_name, dp->d_namlen); (void)closedir(dir); /* Truncate any file name. */ |