summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-18 10:16:10 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-18 10:16:10 +0200
commit73d4f46a77f8f005bbf6556e4a1798f5440826a0 (patch)
tree14fd8604f6bd4b24f2a0376a0b5c673647391e8a
parentd2b5f6bdbbb7981fb687376f7bf40554fa99ab1e (diff)
parentb2b46f91dbb71676cb981907c68521e4b1e80af1 (diff)
Merge pull request #983 from phomes/journal_dead_check
journal: remove error check that never happens
-rw-r--r--src/journal/sd-journal.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 9f0f71aa81..bfd1901e16 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1489,7 +1489,7 @@ static int add_root_directory(sd_journal *j, const char *p) {
return 0;
}
-static int remove_directory(sd_journal *j, Directory *d) {
+static void remove_directory(sd_journal *j, Directory *d) {
assert(j);
if (d->wd > 0) {
@@ -1508,8 +1508,6 @@ static int remove_directory(sd_journal *j, Directory *d) {
free(d->path);
free(d);
-
- return 0;
}
static int add_search_paths(sd_journal *j) {
@@ -2147,12 +2145,8 @@ static void process_inotify_event(sd_journal *j, struct inotify_event *e) {
/* Event for a subdirectory */
- if (e->mask & (IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT)) {
- r = remove_directory(j, d);
- if (r < 0)
- log_debug_errno(r, "Failed to remove directory %s: %m", d->path);
- }
-
+ if (e->mask & (IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT))
+ remove_directory(j, d);
} else if (d->is_root && (e->mask & IN_ISDIR) && e->len > 0 && sd_id128_from_string(e->name, &id) >= 0) {