chiark / gitweb /
use "Out of memory." consistantly (or with "\n")
[elogind.git] / src / login / logind-user.c
index 4622812e3c66eda4a2153e13f18f8af9864df5db..fca68159a7c556e43f48c96fde23aeb1beae235c 100644 (file)
@@ -259,10 +259,8 @@ static int user_mkdir_runtime_path(User *u) {
         }
 
         if (!u->runtime_path) {
-                p = strappend("/run/user/", u->name);
-
-                if (!p) {
-                        log_error("Out of memory");
+                if (asprintf(&p, "/run/user/%lu", (unsigned long) u->uid) < 0) {
+                        log_error("Out of memory.");
                         return -ENOMEM;
                 }
         } else
@@ -289,7 +287,7 @@ static int user_create_cgroup(User *u) {
 
         if (!u->cgroup_path) {
                 if (asprintf(&p, "%s/%s", u->manager->cgroup_path, u->name) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         return -ENOMEM;
                 }
         } else