Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jun 2017 13:49:57 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r319853 - head/usr.sbin/makefs
Message-ID:  <201706121349.v5CDnvfj008054@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Jun 12 13:49:57 2017
New Revision: 319853
URL: https://svnweb.freebsd.org/changeset/base/319853

Log:
  makefs: use C standard memcpy/memset in userland
  
  This file does not exist in NetBSD's makefs, but make the chance for
  consistency with memcpy/memset used in the rest of makefs.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/usr.sbin/makefs/mtree.c

Modified: head/usr.sbin/makefs/mtree.c
==============================================================================
--- head/usr.sbin/makefs/mtree.c	Mon Jun 12 09:11:31 2017	(r319852)
+++ head/usr.sbin/makefs/mtree.c	Mon Jun 12 13:49:57 2017	(r319853)
@@ -455,7 +455,7 @@ create_node(const char *name, u_int type, fsnode *pare
 	n->inode = ecalloc(1, sizeof(*n->inode));
 
 	/* Assign global options/defaults. */
-	bcopy(global->inode, n->inode, sizeof(*n->inode));
+	memcpy(n->inode, global->inode, sizeof(*n->inode));
 	n->inode->st.st_mode = (n->inode->st.st_mode & ~S_IFMT) | n->type;
 
 	if (n->type == S_IFLNK)
@@ -1041,8 +1041,8 @@ read_mtree(const char *fname, fsnode *node)
 	if (error)
 		goto out;
 
-	bzero(&mtree_global, sizeof(mtree_global));
-	bzero(&mtree_global_inode, sizeof(mtree_global_inode));
+	memset(&mtree_global, 0, sizeof(mtree_global));
+	memset(&mtree_global_inode, 0, sizeof(mtree_global_inode));
 	mtree_global.inode = &mtree_global_inode;
 	mtree_global_inode.nlink = 1;
 	mtree_global_inode.st.st_nlink = 1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706121349.v5CDnvfj008054>