chiark / gitweb /
coverity: fix a couple of bugs found by coverity
[elogind.git] / src / path.c
index 200fc2bdcb194a54877b60327a9f61079dd2acdd..f15c9214efb35c73fd5cdea904dc802d5fc783cd 100644 (file)
@@ -563,7 +563,7 @@ static void path_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
         assert(l > 0);
 
         if (!(buf = malloc(l))) {
-                log_error("Failed to allocate buffer: %s", strerror(-ENOMEM));
+                log_error("Failed to allocate buffer: %s", strerror(ENOMEM));
                 goto fail;
         }
 
@@ -686,6 +686,10 @@ DEFINE_STRING_TABLE_LOOKUP(path_type, PathType);
 
 const UnitVTable path_vtable = {
         .suffix = ".path",
+        .sections =
+                "Unit\0"
+                "Path\0"
+                "Install\0",
 
         .init = path_init,
         .done = path_done,