chiark / gitweb /
__thread --> thread_local for C11 compat
[elogind.git] / src / login / logind-inhibit.c
index 35e1abd72918fcea2d8893829ecc57f17efc3d0f..042586d0738c9268ae54bc8ce07a04c0b3465293 100644 (file)
@@ -45,7 +45,7 @@ Inhibitor* inhibitor_new(Manager *m, const char* id) {
                 return NULL;
         }
 
-        i->id = path_get_file_name(i->state_file);
+        i->id = basename(i->state_file);
 
         if (hashmap_put(m->inhibitors, i->id, i) < 0) {
                 free(i->state_file);
@@ -413,7 +413,7 @@ bool manager_is_inhibited(
 }
 
 const char *inhibit_what_to_string(InhibitWhat w) {
-        static __thread char buffer[97];
+        static thread_local char buffer[97];
         char *p;
 
         if (w < 0 || w >= _INHIBIT_WHAT_MAX)