tree-wide: drop _pure_ + _const_ from local, static functions
This is supposed to be a help for compilers to apply optimizations on functions where they can't determine whether they are const/pure on their own. For static, local functions the compiler can do this on its own easily however, hence the decoration with pure/const is just noise. Let's drop it, and let the compiler to its thing better. (Use it for exported functions, since compilers can't 'reach-over' into other modules to determine if they are pure, except if LTO is used)
This commit is contained in:
committed by
Mike Yuan
parent
07ba0bf7f5
commit
d1e8e8b5ae
+2
-2
@@ -733,13 +733,13 @@ static int timer_deserialize_item(Unit *u, const char *key, const char *value, F
|
||||
return 0;
|
||||
}
|
||||
|
||||
_pure_ static UnitActiveState timer_active_state(Unit *u) {
|
||||
static UnitActiveState timer_active_state(Unit *u) {
|
||||
assert(u);
|
||||
|
||||
return state_translation_table[TIMER(u)->state];
|
||||
}
|
||||
|
||||
_pure_ static const char *timer_sub_state_to_string(Unit *u) {
|
||||
static const char *timer_sub_state_to_string(Unit *u) {
|
||||
assert(u);
|
||||
|
||||
return timer_state_to_string(TIMER(u)->state);
|
||||
|
||||
Reference in New Issue
Block a user