chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add __attribute__((const, pure, format)) in various places
[elogind.git]
/
src
/
core
/
snapshot.c
diff --git
a/src/core/snapshot.c
b/src/core/snapshot.c
index a3f5e908ebcf9346a7a173a187ffe7e3fa0cce48..a63eccd8de08477b058d82320126a39dad63d763 100644
(file)
--- a/
src/core/snapshot.c
+++ b/
src/core/snapshot.c
@@
-173,13
+173,13
@@
static int snapshot_deserialize_item(Unit *u, const char *key, const char *value
return 0;
}
return 0;
}
-static UnitActiveState snapshot_active_state(Unit *u) {
+
_pure_
static UnitActiveState snapshot_active_state(Unit *u) {
assert(u);
return state_translation_table[SNAPSHOT(u)->state];
}
assert(u);
return state_translation_table[SNAPSHOT(u)->state];
}
-static const char *snapshot_sub_state_to_string(Unit *u) {
+
_pure_
static const char *snapshot_sub_state_to_string(Unit *u) {
assert(u);
return snapshot_state_to_string(SNAPSHOT(u)->state);
assert(u);
return snapshot_state_to_string(SNAPSHOT(u)->state);