tsort: Replace bcopy() with memcpy().
Also fix an indentation error I introduced in the previous commit.
Fixes: cb46f47c79
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D40042
This commit is contained in:
parent
00de65aaed
commit
b55bc49e86
@ -183,8 +183,8 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* do the sort */
|
/* do the sort */
|
||||||
tsort();
|
tsort();
|
||||||
if (ferror(stdout) != 0 || fflush(stdout) != 0)
|
if (ferror(stdout) != 0 || fflush(stdout) != 0)
|
||||||
err(1, "stdout");
|
err(1, "stdout");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ get_node(char *name)
|
|||||||
|
|
||||||
switch ((*db->get)(db, &key, &data, 0)) {
|
switch ((*db->get)(db, &key, &data, 0)) {
|
||||||
case 0:
|
case 0:
|
||||||
bcopy(data.data, &n, sizeof(n));
|
memcpy(&n, data.data, sizeof(n));
|
||||||
return (n);
|
return (n);
|
||||||
case 1:
|
case 1:
|
||||||
break;
|
break;
|
||||||
@ -268,7 +268,7 @@ get_node(char *name)
|
|||||||
n->n_arcs = NULL;
|
n->n_arcs = NULL;
|
||||||
n->n_refcnt = 0;
|
n->n_refcnt = 0;
|
||||||
n->n_flags = 0;
|
n->n_flags = 0;
|
||||||
bcopy(name, n->n_name, key.size);
|
memcpy(n->n_name, name, key.size);
|
||||||
|
|
||||||
/* Add to linked list. */
|
/* Add to linked list. */
|
||||||
if ((n->n_next = graph) != NULL)
|
if ((n->n_next = graph) != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user