summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-01-05 06:09:52 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-01-05 06:09:52 +0000
commit8835a8910513621a4c20a0ede9a4bdeee947cbd4 (patch)
tree1cdf3c45b686371c900a80152e8ac127873f10c0
parent91c2a985f9d00247ba2fda6aebbffaeac609f328 (diff)
- (bal) bsd-getcwd.c and bsd-setenv.c changed from bcopy() to memmove()
-rw-r--r--ChangeLog1
-rw-r--r--bsd-getcwd.c8
-rw-r--r--bsd-setenv.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 71350188..8d6bea18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
20010105
- (bal) contrib/caldera/ provided by Tim Rice <tim@multitalents.net>
+ - (bal) bsd-getcwd.c and bsd-setenv.c changed from bcopy() to memmove()
20010104
- (djm) Fix memory leak on systems with BROKEN_GETADDRINFO. Based on
diff --git a/bsd-getcwd.c b/bsd-getcwd.c
index cca41778..273a0487 100644
--- a/bsd-getcwd.c
+++ b/bsd-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.
*/
- bcopy(bpt, pt, ept - bpt);
+ memmove(bpt, pt, ept - bpt);
free(up);
return (pt);
}
@@ -170,7 +170,7 @@ getcwd(char *pt,size_t size)
goto notfound;
if (ISDOT(dp))
continue;
- bcopy(dp->d_name, bup, dp->d_namlen + 1);
+ memmove(dp->d_name, bup, 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;
- bcopy(bpt, ept - len, len);
+ memmove(bpt, ept - len, len);
bpt = ept - len;
}
if (!first)
*--bpt = '/';
bpt -= dp->d_namlen;
- bcopy(dp->d_name, bpt, dp->d_namlen);
+ memmove(dp->d_name, bpt, dp->d_namlen);
(void)closedir(dir);
/* Truncate any file name. */
diff --git a/bsd-setenv.c b/bsd-setenv.c
index f5dbd277..d69f8825 100644
--- a/bsd-setenv.c
+++ b/bsd-setenv.c
@@ -122,7 +122,7 @@ setenv(name, value, rewrite)
(cnt + 2)));
if (!P)
return (-1);
- bcopy(environ, P, cnt * sizeof(char *));
+ memmove(environ, P, cnt * sizeof(char *));
environ = P;
}
environ[cnt + 1] = NULL;