You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Improve byte_data const correctness
This commit is contained in:
@@ -73,8 +73,8 @@ static bool check_precompiled(const char *precompiled) {
|
||||
}
|
||||
|
||||
static void load_cil(struct cil_db *db, const char *file) {
|
||||
auto d = mmap_data(file);
|
||||
cil_add_file(db, (char *) file, (char *) d.buf, d.sz);
|
||||
mmap_data d(file);
|
||||
cil_add_file(db, file, (const char *) d.buf(), d.sz());
|
||||
LOGD("cil_add [%s]\n", file);
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ bool sepolicy::to_file(const char *file) {
|
||||
if (struct stat st{}; xfstat(fd, &st) == 0 && st.st_size > 0) {
|
||||
ftruncate(fd, 0);
|
||||
}
|
||||
xwrite(fd, data.buf, data.sz);
|
||||
xwrite(fd, data.buf(), data.sz());
|
||||
|
||||
close(fd);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user