log.h: new log_oom() -> int -ENOMEM, use it

also a number of minor fixups and bug fixes: spelling, oom errors
that didn't print errors, not properly forwarding error codes,
few more consistency issues, et cetera
This commit is contained in:
Shawn Landden
2012-07-26 11:48:26 +02:00
committed by Kay Sievers
parent e146e4516b
commit 0d0f0c50d3
40 changed files with 183 additions and 310 deletions
+4 -8
View File
@@ -49,17 +49,13 @@ static int add_modules(const char *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);
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;