chiark / gitweb /
Add __attribute__((const, pure, format)) in various places
[elogind.git] / src / core / swap.c
index b363c5ec092b2814dfbfbbc91f4445eb967499c2..d503fe20df756448f2b19fc302f705d8aac58b7d 100644 (file)
@@ -214,7 +214,7 @@ static int swap_add_default_dependencies(Swap *s) {
 
 static int swap_verify(Swap *s) {
         bool b;
-        char _cleanup_free_ *e = NULL;
+        _cleanup_free_ char *e = NULL;
 
         if (UNIT(s)->load_state != UNIT_LOADED)
                   return 0;
@@ -315,7 +315,7 @@ static int swap_add_one(
                 bool set_flags) {
 
         Unit *u = NULL;
-        char _cleanup_free_ *e = NULL;
+        _cleanup_free_ char *e = NULL;
         char *wp = NULL;
         bool delete = false;
         int r;
@@ -899,19 +899,19 @@ static int swap_deserialize_item(Unit *u, const char *key, const char *value, FD
         return 0;
 }
 
-static UnitActiveState swap_active_state(Unit *u) {
+_pure_ static UnitActiveState swap_active_state(Unit *u) {
         assert(u);
 
         return state_translation_table[SWAP(u)->state];
 }
 
-static const char *swap_sub_state_to_string(Unit *u) {
+_pure_ static const char *swap_sub_state_to_string(Unit *u) {
         assert(u);
 
         return swap_state_to_string(SWAP(u)->state);
 }
 
-static bool swap_check_gc(Unit *u) {
+_pure_ static bool swap_check_gc(Unit *u) {
         Swap *s = SWAP(u);
 
         assert(s);