git: b55bc49e8694 - main - tsort: Replace bcopy() with memcpy().
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 10 May 2023 13:46:17 UTC
The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b55bc49e8694d9226a82041ff23ad61a5c7a6a76 commit b55bc49e8694d9226a82041ff23ad61a5c7a6a76 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2023-05-10 13:45:38 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2023-05-10 13:45:38 +0000 tsort: Replace bcopy() with memcpy(). Also fix an indentation error I introduced in the previous commit. Fixes: cb46f47c7969 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40042 --- usr.bin/tsort/tsort.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/tsort/tsort.c b/usr.bin/tsort/tsort.c index b2dbe9beb799..53c66e44c76a 100644 --- a/usr.bin/tsort/tsort.c +++ b/usr.bin/tsort/tsort.c @@ -183,8 +183,8 @@ main(int argc, char *argv[]) /* do the sort */ tsort(); - if (ferror(stdout) != 0 || fflush(stdout) != 0) - err(1, "stdout"); + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); exit(0); } @@ -251,7 +251,7 @@ get_node(char *name) switch ((*db->get)(db, &key, &data, 0)) { case 0: - bcopy(data.data, &n, sizeof(n)); + memcpy(&n, data.data, sizeof(n)); return (n); case 1: break; @@ -268,7 +268,7 @@ get_node(char *name) n->n_arcs = NULL; n->n_refcnt = 0; n->n_flags = 0; - bcopy(name, n->n_name, key.size); + memcpy(n->n_name, name, key.size); /* Add to linked list. */ if ((n->n_next = graph) != NULL)