aboutsummaryrefslogtreecommitdiff
path: root/libps
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-08-05 19:26:25 +0200
committerJustus Winter <justus@gnupg.org>2017-08-05 20:55:06 +0200
commita2f64c2462282bb3cf1ad24044c97bb7d6b85e0d (patch)
tree44ea9ba66247feaf008b9220314fc8f07422570c /libps
parent66553fd7a7bcf7c260b45f2e7ad54e98d33f8080 (diff)
downloadhurd-a2f64c2462282bb3cf1ad24044c97bb7d6b85e0d.tar.gz
hurd-a2f64c2462282bb3cf1ad24044c97bb7d6b85e0d.tar.bz2
hurd-a2f64c2462282bb3cf1ad24044c97bb7d6b85e0d.zip
Replace bcopy with memcpy or memmove as appropriate.
* boot/boot.c: Replace bcopy with memcpy or memmove as appropriate. * exec/hashexec.c: Likewise. * libps/proclist.c: Likewise, but also fix the amount of data copied. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/timefmt.c: Likewise.
Diffstat (limited to 'libps')
-rw-r--r--libps/proclist.c2
-rw-r--r--libps/procstat.c10
-rw-r--r--libps/spec.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/libps/proclist.c b/libps/proclist.c
index 2201cadc..4e2174ac 100644
--- a/libps/proclist.c
+++ b/libps/proclist.c
@@ -68,7 +68,7 @@ proc_stat_list_clone (struct proc_stat_list *pp, struct proc_stat_list **copy)
return ENOMEM;
}
- bcopy (pp->proc_stats, procs, pp->num_procs);
+ memcpy (procs, pp->proc_stats, sizeof *procs * pp->num_procs);
new->proc_stats = procs;
new->num_procs = pp->num_procs;
diff --git a/libps/procstat.c b/libps/procstat.c
index c6c3a44f..f6420eea 100644
--- a/libps/procstat.c
+++ b/libps/procstat.c
@@ -224,12 +224,12 @@ merge_procinfo (struct proc_stat *ps, ps_flags_t need, ps_flags_t have)
/* There was old information, try merging it. */
if (have & PSTAT_TASK_BASIC)
/* Task info. */
- bcopy (&old_pi_hdr.taskinfo, &new_pi->taskinfo,
- sizeof (struct task_basic_info));
+ memcpy (&new_pi->taskinfo, &old_pi_hdr.taskinfo,
+ sizeof (struct task_basic_info));
if (have & PSTAT_TASK_EVENTS)
/* Event info. */
- bcopy (&old_pi_hdr.taskevents, &new_pi->taskevents,
- sizeof (struct task_events_info));
+ memcpy (&new_pi->taskevents, &old_pi_hdr.taskevents,
+ sizeof (struct task_events_info));
/* That's it for now. */
if (new_pi != ps->proc_info)
@@ -604,7 +604,7 @@ clone (void *src, size_t size)
{
void *dst = malloc (size);
if (dst)
- bcopy (src, dst, size);
+ memcpy (dst, src, size);
return dst;
}
diff --git a/libps/spec.c b/libps/spec.c
index 4a6e226f..5e540f87 100644
--- a/libps/spec.c
+++ b/libps/spec.c
@@ -1023,7 +1023,7 @@ specs_add_alias (struct ps_fmt_specs *specs,
exp->name = malloc (name_len + 1);
if (! exp->name)
return 0;
- bcopy ((char *)alias->name, (char *)exp->name, name_len);
+ memcpy ((char *)exp->name, (char *)alias->name, name_len);
((char *)exp->name)[name_len] = '\0';
/* Copy the rest of the fields from ALIAS, but defaulting to SRC. */