]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - libxfs/xfs_dir2_leaf.c
Merge whitespace changes over
[thirdparty/xfsprogs-dev.git] / libxfs / xfs_dir2_leaf.c
index 897f5ebbce70b34df3a03fcf39fd9467087a4e83..9205950a0548262d3901e22a04529dcd1df028dc 100644 (file)
@@ -11,7 +11,7 @@
  *
  * Further, this software is distributed without any warranty that it is
  * free of the rightful claim of any third person regarding infringement
- * or the like.         Any license provided herein, whether implied or
+ * or the like.  Any license provided herein, whether implied or
  * otherwise, applies only to this software file.  Patent licenses, if
  * any, provided herein do not apply to combinations of this program with
  * other software, or any other product whatsoever.
@@ -100,7 +100,7 @@ xfs_dir2_block_to_leaf(
         * Could compact these but I think we always do the conversion
         * after squeezing out stale entries.
         */
-       bcopy(blp, leaf->ents, INT_GET(btp->count, ARCH_CONVERT) * sizeof(xfs_dir2_leaf_entry_t));
+       memcpy(leaf->ents, blp, INT_GET(btp->count, ARCH_CONVERT) * sizeof(xfs_dir2_leaf_entry_t));
        xfs_dir2_leaf_log_ents(tp, lbp, 0, INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1);
        needscan = 0;
        needlog = 1;
@@ -343,7 +343,7 @@ xfs_dir2_leaf_addname(
                 */
                if (use_block >= INT_GET(ltp->bestcount, ARCH_CONVERT)) {
                        bestsp--;
-                       ovbcopy(&bestsp[1], &bestsp[0],
+                       memmove(&bestsp[0], &bestsp[1],
                                INT_GET(ltp->bestcount, ARCH_CONVERT) * sizeof(bestsp[0]));
                        INT_MOD(ltp->bestcount, ARCH_CONVERT, +1);
                        xfs_dir2_leaf_log_tail(tp, lbp);
@@ -392,7 +392,7 @@ xfs_dir2_leaf_addname(
        dep = (xfs_dir2_data_entry_t *)dup;
        INT_SET(dep->inumber, ARCH_CONVERT, args->inumber);
        dep->namelen = args->namelen;
-       bcopy(args->name, dep->name, dep->namelen);
+       memcpy(dep->name, args->name, dep->namelen);
        tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep);
        INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)data));
        /*
@@ -424,7 +424,7 @@ xfs_dir2_leaf_addname(
                 * lep is still good as the index leaf entry.
                 */
                if (index < INT_GET(leaf->hdr.count, ARCH_CONVERT))
-                       ovbcopy(lep, lep + 1,
+                       memmove(lep + 1, lep,
                                (INT_GET(leaf->hdr.count, ARCH_CONVERT) - index) * sizeof(*lep));
                /*
                 * Record low and high logging indices for the leaf.
@@ -483,8 +483,8 @@ xfs_dir2_leaf_addname(
                         * and make room for the new entry.
                         */
                        if (index - lowstale - 1 > 0)
-                               ovbcopy(&leaf->ents[lowstale + 1],
-                                       &leaf->ents[lowstale],
+                               memmove(&leaf->ents[lowstale],
+                                       &leaf->ents[lowstale + 1],
                                        (index - lowstale - 1) * sizeof(*lep));
                        lep = &leaf->ents[index - 1];
                        lfloglow = MIN(lowstale, lfloglow);
@@ -502,8 +502,8 @@ xfs_dir2_leaf_addname(
                         * and make room for the new entry.
                         */
                        if (highstale - index > 0)
-                               ovbcopy(&leaf->ents[index],
-                                       &leaf->ents[index + 1],
+                               memmove(&leaf->ents[index + 1],
+                                       &leaf->ents[index],
                                        (highstale - index) * sizeof(*lep));
                        lep = &leaf->ents[index];
                        lfloglow = MIN(index, lfloglow);
@@ -528,7 +528,6 @@ xfs_dir2_leaf_addname(
        return 0;
 }
 
-
 #ifdef DEBUG
 /*
  * Check the internal consistency of a leaf1 block.
@@ -584,7 +583,7 @@ xfs_dir2_leaf_compact(
        xfs_dabuf_t     *bp)            /* leaf buffer */
 {
        int             from;           /* source leaf index */
-       xfs_dir2_leaf_t *leaf;          /* leaf structure */
+       xfs_dir2_leaf_t *leaf;          /* leaf structure */
        int             loglow;         /* first leaf entry to log */
        int             to;             /* target leaf index */
 
@@ -640,7 +639,7 @@ xfs_dir2_leaf_compact_x1(
        int             highstale;      /* stale entry at/after index */
        int             index;          /* insertion index */
        int             keepstale;      /* source index of kept stale */
-       xfs_dir2_leaf_t *leaf;          /* leaf structure */
+       xfs_dir2_leaf_t *leaf;          /* leaf structure */
        int             lowstale;       /* stale entry before index */
        int             newindex=0;     /* new insertion index */
        int             to;             /* destination copy index */
@@ -1007,7 +1006,7 @@ xfs_dir2_leaf_lookup_int(
                 */
                if (dep->namelen == args->namelen &&
                    dep->name[0] == args->name[0] &&
-                   bcmp(dep->name, args->name, args->namelen) == 0) {
+                   memcmp(dep->name, args->name, args->namelen) == 0) {
                        *dbpp = dbp;
                        *indexp = index;
                        return 0;
@@ -1142,7 +1141,7 @@ xfs_dir2_leaf_removename(
                         * Copy the table down so inactive entries at the
                         * end are removed.
                         */
-                       ovbcopy(bestsp, &bestsp[db - i],
+                       memmove(&bestsp[db - i], bestsp,
                                (INT_GET(ltp->bestcount, ARCH_CONVERT) - (db - i)) * sizeof(*bestsp));
                        INT_MOD(ltp->bestcount, ARCH_CONVERT, -(db - i));
                        xfs_dir2_leaf_log_tail(tp, lbp);
@@ -1326,7 +1325,7 @@ xfs_dir2_leaf_trim_data(
         */
        bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT);
        INT_MOD(ltp->bestcount, ARCH_CONVERT, -1);
-       ovbcopy(&bestsp[0], &bestsp[1], INT_GET(ltp->bestcount, ARCH_CONVERT) * sizeof(*bestsp));
+       memmove(&bestsp[1], &bestsp[0], INT_GET(ltp->bestcount, ARCH_CONVERT) * sizeof(*bestsp));
        xfs_dir2_leaf_log_tail(tp, lbp);
        xfs_dir2_leaf_log_bests(tp, lbp, 0, INT_GET(ltp->bestcount, ARCH_CONVERT) - 1);
        return 0;
@@ -1440,7 +1439,7 @@ xfs_dir2_node_to_leaf(
        /*
         * Set up the leaf bests table.
         */
-       bcopy(free->bests, XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT),
+       memcpy(XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT), free->bests,
                INT_GET(ltp->bestcount, ARCH_CONVERT) * sizeof(leaf->bests[0]));
        xfs_dir2_leaf_log_bests(tp, lbp, 0, INT_GET(ltp->bestcount, ARCH_CONVERT) - 1);
        xfs_dir2_leaf_log_tail(tp, lbp);