Fixes build error

device/phh/treble/magisk/Magisk/native/jni/systemproperties/prop_area.cpp:386:3: error: no matching function for call to 'atomic_store_explicit'
  atomic_store_explicit(&node->prop, 0, memory_order_release);
  ^~~~~~~~~~~~~~~~~~~~~
external/libcxx/include/atomic:1220:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('unsigned int' vs. 'int')
atomic_store_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
^
external/libcxx/include/atomic:1229:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('unsigned int' vs. 'int')
atomic_store_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
This commit is contained in:
Pierre-Hugues Husson 2019-01-10 23:27:35 +01:00 committed by John Wu
parent ffebff8cab
commit bc6f37eecc

View File

@ -383,7 +383,8 @@ bool prop_area::del(const char *name) {
prop_bt* node = find_prop_bt(root_node(), name, false);
if (!node)
return false;
atomic_store_explicit(&node->prop, 0, memory_order_release);
uint_least32_t new_offset = 0;
atomic_store_explicit(&node->prop, new_offset, memory_order_release);
return true;
}