aboutsummaryrefslogtreecommitdiff
path: root/dirs.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-04-25 12:49:21 +0000
committerOmar Polo <op@omarpolo.com>2021-04-25 12:49:21 +0000
commitb5fdc32e758f57a11fcb78a7571649044b681b1b (patch)
tree198ec243703518682d529946217f7bdfd757910e /dirs.c
parent5aba63956a04590ade71cffa0cef0a5d2356f42b (diff)
use memcpy instead of bcopy
memcpy is ANSI C89, bcopy seems to be an history BSD function.
Diffstat (limited to 'dirs.c')
-rw-r--r--dirs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dirs.c b/dirs.c
index 66e38d4..3b447e5 100644
--- a/dirs.c
+++ b/dirs.c
@@ -129,7 +129,7 @@ scandir_fd(int fd, struct dirent ***namelist,
p->d_ino = d->d_ino;
p->d_type = d->d_type;
p->d_reclen = d->d_reclen;
- bcopy(d->d_name, p->d_name, namlen + 1);
+ memcpy(p->d_name, d->d_name, namlen + 1);
names[nitems++] = p;
}
closedir(dirp);