aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/dump.c12
-rw-r--r--util-linux/fdisk.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/libbb/dump.c b/libbb/dump.c
index 9337ca63a..9dcfb5408 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -550,12 +550,12 @@ static void display(void)
550 550
551 switch (pr->bcnt) { 551 switch (pr->bcnt) {
552 case 4: 552 case 4:
553 bcopy((char *) bp, (char *) &fval, 553 memmove((char *) &fval, (char *) bp,
554 sizeof(fval)); 554 sizeof(fval));
555 printf(pr->fmt, fval); 555 printf(pr->fmt, fval);
556 break; 556 break;
557 case 8: 557 case 8:
558 bcopy((char *) bp, (char *) &dval, 558 memmove((char *) &dval, (char *) bp,
559 sizeof(dval)); 559 sizeof(dval));
560 printf(pr->fmt, dval); 560 printf(pr->fmt, dval);
561 break; 561 break;
@@ -571,12 +571,12 @@ static void display(void)
571 printf(pr->fmt, (int) *bp); 571 printf(pr->fmt, (int) *bp);
572 break; 572 break;
573 case 2: 573 case 2:
574 bcopy((char *) bp, (char *) &sval, 574 memmove((char *) &sval, (char *) bp,
575 sizeof(sval)); 575 sizeof(sval));
576 printf(pr->fmt, (int) sval); 576 printf(pr->fmt, (int) sval);
577 break; 577 break;
578 case 4: 578 case 4:
579 bcopy((char *) bp, (char *) &ival, 579 memmove((char *) &ival, (char *) bp,
580 sizeof(ival)); 580 sizeof(ival));
581 printf(pr->fmt, ival); 581 printf(pr->fmt, ival);
582 break; 582 break;
@@ -604,12 +604,12 @@ static void display(void)
604 printf(pr->fmt, (unsigned int) * bp); 604 printf(pr->fmt, (unsigned int) * bp);
605 break; 605 break;
606 case 2: 606 case 2:
607 bcopy((char *) bp, (char *) &sval, 607 memmove((char *) &sval, (char *) bp,
608 sizeof(sval)); 608 sizeof(sval));
609 printf(pr->fmt, (unsigned int) sval); 609 printf(pr->fmt, (unsigned int) sval);
610 break; 610 break;
611 case 4: 611 case 4:
612 bcopy((char *) bp, (char *) &ival, 612 memmove((char *) &ival, (char *) bp,
613 sizeof(ival)); 613 sizeof(ival));
614 printf(pr->fmt, ival); 614 printf(pr->fmt, ival);
615 break; 615 break;
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index f119788b1..9701c467b 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -1322,7 +1322,7 @@ xbsd_write_bootstrap(void)
1322 1322
1323/* We need a backup of the disklabel (xbsd_dlabel might have changed). */ 1323/* We need a backup of the disklabel (xbsd_dlabel might have changed). */
1324 d = &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE]; 1324 d = &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE];
1325 bcopy(d, &dl, sizeof(struct xbsd_disklabel)); 1325 memmove(&dl, d, sizeof(struct xbsd_disklabel));
1326 1326
1327/* The disklabel will be overwritten by 0's from bootxx anyway */ 1327/* The disklabel will be overwritten by 0's from bootxx anyway */
1328 memset(d, 0, sizeof(struct xbsd_disklabel)); 1328 memset(d, 0, sizeof(struct xbsd_disklabel));
@@ -1339,7 +1339,7 @@ xbsd_write_bootstrap(void)
1339 exit(EXIT_FAILURE); 1339 exit(EXIT_FAILURE);
1340 } 1340 }
1341 1341
1342 bcopy(&dl, d, sizeof(struct xbsd_disklabel)); 1342 memmove(d, &dl, sizeof(struct xbsd_disklabel));
1343 1343
1344#if defined (__powerpc__) || defined (__hppa__) 1344#if defined (__powerpc__) || defined (__hppa__)
1345 sector = 0; 1345 sector = 0;
@@ -1526,8 +1526,8 @@ xbsd_readlabel (struct partition *p, struct xbsd_disklabel *d)
1526 if (BSD_BBSIZE != read(fd, disklabelbuffer, BSD_BBSIZE)) 1526 if (BSD_BBSIZE != read(fd, disklabelbuffer, BSD_BBSIZE))
1527 fdisk_fatal(unable_to_read); 1527 fdisk_fatal(unable_to_read);
1528 1528
1529 bcopy(&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], 1529 memmove(d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET],
1530 d, sizeof(struct xbsd_disklabel)); 1530 sizeof(struct xbsd_disklabel));
1531 1531
1532 if (d->d_magic != BSD_DISKMAGIC || d->d_magic2 != BSD_DISKMAGIC) 1532 if (d->d_magic != BSD_DISKMAGIC || d->d_magic2 != BSD_DISKMAGIC)
1533 return 0; 1533 return 0;
@@ -1562,8 +1562,8 @@ xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d)
1562 /* This is necessary if we want to write the bootstrap later, 1562 /* This is necessary if we want to write the bootstrap later,
1563 otherwise we'd write the old disklabel with the bootstrap. 1563 otherwise we'd write the old disklabel with the bootstrap.
1564 */ 1564 */
1565 bcopy(d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], 1565 memmove(&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET],
1566 sizeof(struct xbsd_disklabel)); 1566 d, sizeof(struct xbsd_disklabel));
1567 1567
1568#if defined (__alpha__) && BSD_LABELSECTOR == 0 1568#if defined (__alpha__) && BSD_LABELSECTOR == 0
1569 alpha_bootblock_checksum (disklabelbuffer); 1569 alpha_bootblock_checksum (disklabelbuffer);