chiark / gitweb /
log.h: new log_oom() -> int -ENOMEM, use it
[elogind.git] / src / modules-load / modules-load.c
index e73ba7f2418a14b73c464e0234e5381933633475..6aeaf459aff0d65e837b4072ce6cfc006c959336 100644 (file)
@@ -49,17 +49,13 @@ static int add_modules(const char *p) {
         char **t, **k;
 
         k = strv_split(p, ",");
         char **t, **k;
 
         k = strv_split(p, ",");
-        if (!k) {
-                log_error("Out of memory.");
-                return -ENOMEM;
-        }
+        if (!k)
+                return log_oom();
 
         t = strv_merge(arg_proc_cmdline_modules, k);
         strv_free(k);
 
         t = strv_merge(arg_proc_cmdline_modules, k);
         strv_free(k);
-        if (!t) {
-                log_error("Out of memory.");
-                return -ENOMEM;
-        }
+        if (!t)
+                return log_oom();
 
         strv_free(arg_proc_cmdline_modules);
         arg_proc_cmdline_modules = t;
 
         strv_free(arg_proc_cmdline_modules);
         arg_proc_cmdline_modules = t;