mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 20:47:38 +00:00
Fix incorrect use of compare_exchange
This commit is contained in:
parent
ee0d58a9b8
commit
4ea8bd0229
@ -28,8 +28,8 @@ static const string *default_cert;
|
||||
bool need_pkg_refresh() {
|
||||
struct stat st{};
|
||||
stat("/data/system/packages.xml", &st);
|
||||
ino_t ino = st.st_ino;
|
||||
if (pkg_xml_ino.compare_exchange_strong(ino, st.st_ino)) {
|
||||
ino_t ino = pkg_xml_ino.exchange(st.st_ino);
|
||||
if (ino == st.st_ino) {
|
||||
// Packages have not changed
|
||||
return false;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user