chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
path-util: in path_is_mount_point() fall back to the classic stat() test if fs does...
[elogind.git]
/
src
/
tmpfiles
/
tmpfiles.c
diff --git
a/src/tmpfiles/tmpfiles.c
b/src/tmpfiles/tmpfiles.c
index 45125b7b946ee7a2bf59d1b11d52739506bce35b..e70332ca0635fceab007e3633913297578033655 100644
(file)
--- a/
src/tmpfiles/tmpfiles.c
+++ b/
src/tmpfiles/tmpfiles.c
@@
-260,8
+260,7
@@
static int dir_cleanup(
sub_path = NULL;
if (asprintf(&sub_path, "%s/%s", p, dent->d_name) < 0) {
sub_path = NULL;
if (asprintf(&sub_path, "%s/%s", p, dent->d_name) < 0) {
- log_error("Out of memory");
- r = -ENOMEM;
+ r = log_oom();
goto finish;
}
goto finish;
}
@@
-969,10
+968,8
@@
static int parse_line(const char *fname, unsigned line, const char *buffer) {
assert(buffer);
i = new0(Item, 1);
assert(buffer);
i = new0(Item, 1);
- if (!i) {
- log_error("Out of memory");
- return -ENOMEM;
- }
+ if (!i)
+ return log_oom();
if (sscanf(buffer,
"%c "
if (sscanf(buffer,
"%c "
@@
-998,10
+995,8
@@
static int parse_line(const char *fname, unsigned line, const char *buffer) {
n += strspn(buffer+n, WHITESPACE);
if (buffer[n] != 0 && (buffer[n] != '-' || buffer[n+1] != 0)) {
i->argument = unquote(buffer+n, "\"");
n += strspn(buffer+n, WHITESPACE);
if (buffer[n] != 0 && (buffer[n] != '-' || buffer[n+1] != 0)) {
i->argument = unquote(buffer+n, "\"");
- if (!i->argument) {
- log_error("Out of memory");
- return -ENOMEM;
- }
+ if (!i->argument)
+ return log_oom();
}
}
}
}
@@
-1302,7
+1297,7
@@
static char *resolve_fragment(const char *fragment, const char **search_paths) {
STRV_FOREACH(p, search_paths) {
resolved_path = strjoin(*p, "/", fragment, NULL);
if (resolved_path == NULL) {
STRV_FOREACH(p, search_paths) {
resolved_path = strjoin(*p, "/", fragment, NULL);
if (resolved_path == NULL) {
- log_
error("Out of memory"
);
+ log_
oom(
);
return NULL;
}
return NULL;
}
@@
-1337,7
+1332,7
@@
int main(int argc, char *argv[]) {
globs = hashmap_new(string_hash_func, string_compare_func);
if (!items || !globs) {
globs = hashmap_new(string_hash_func, string_compare_func);
if (!items || !globs) {
- log_
error("Out of memory"
);
+ log_
oom(
);
r = EXIT_FAILURE;
goto finish;
}
r = EXIT_FAILURE;
goto finish;
}