Changeset f167c851 in mainline for uspace/lib/ext4/src/extent.c


Ignore:
Timestamp:
2025-04-13T15:39:18Z (9 days ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
28c39f3
Parents:
9daee3de
Message:

Replace a memmove() that spits a random warning when compiling with ubsan

This way is probably faster too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/src/extent.c

    r9daee3de rf167c851  
    888888                ext4_extent_path_t *old_root = path + 1;
    889889
    890                 size_t nbytes = sizeof(ext4_extent_path_t) * (path->depth + 1);
    891                 memmove(old_root, new_root, nbytes);
     890                for (int i = path->depth; i >= 0; i--)
     891                        path[i + 1] = path[i];
     892
    892893                memset(new_root, 0, sizeof(ext4_extent_path_t));
    893894
Note: See TracChangeset for help on using the changeset viewer.