summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/automount.c1
-rw-r--r--src/core/dbus-timer.c3
-rw-r--r--src/core/load-fragment.c8
-rw-r--r--src/core/service.c1
-rw-r--r--src/core/socket.c1
-rw-r--r--src/core/timer.c6
6 files changed, 6 insertions, 14 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 4af381b4b6..2b84c441b2 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -39,7 +39,6 @@
#include "path-util.h"
#include "dbus-automount.h"
#include "bus-util.h"
-#include "bus-error.h"
#include "formats-util.h"
#include "process-util.h"
#include "async.h"
diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c
index 74a9914358..8ea2cf84a4 100644
--- a/src/core/dbus-timer.c
+++ b/src/core/dbus-timer.c
@@ -252,8 +252,7 @@ static int bus_timer_set_transient_property(
v = new0(TimerValue, 1);
if (!v) {
- if (c)
- calendar_spec_free(c);
+ calendar_spec_free(c);
return -ENOMEM;
}
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 299172123e..e1e3a5ffb7 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -552,7 +552,7 @@ int config_parse_exec(
semicolon = false;
- r = unquote_first_word_and_warn(&p, &firstword, UNQUOTE_CUNESCAPE, unit, filename, line, rvalue);
+ r = extract_first_word_and_warn(&p, &firstword, WHITESPACE, EXTRACT_QUOTES|EXTRACT_CUNESCAPE, unit, filename, line, rvalue);
if (r <= 0)
return 0;
@@ -614,7 +614,7 @@ int config_parse_exec(
path_kill_slashes(path);
- for (;;) {
+ while (!isempty(p)) {
_cleanup_free_ char *word = NULL;
/* Check explicitly for an unquoted semicolon as
@@ -627,7 +627,7 @@ int config_parse_exec(
}
/* Check for \; explicitly, to not confuse it with \\;
- * or "\;" or "\\;" etc. unquote_first_word would
+ * or "\;" or "\\;" etc. extract_first_word would
* return the same for all of those. */
if (p[0] == '\\' && p[1] == ';' && (!p[2] || strchr(WHITESPACE, p[2]))) {
p += 2;
@@ -642,7 +642,7 @@ int config_parse_exec(
continue;
}
- r = unquote_first_word_and_warn(&p, &word, UNQUOTE_CUNESCAPE, unit, filename, line, rvalue);
+ r = extract_first_word_and_warn(&p, &word, WHITESPACE, EXTRACT_QUOTES|EXTRACT_CUNESCAPE, unit, filename, line, rvalue);
if (r == 0)
break;
else if (r < 0)
diff --git a/src/core/service.c b/src/core/service.c
index b790ec98be..7bd8cb8b91 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -42,7 +42,6 @@
#include "utf8.h"
#include "env-util.h"
#include "fileio.h"
-#include "bus-error.h"
#include "bus-util.h"
#include "bus-kernel.h"
#include "formats-util.h"
diff --git a/src/core/socket.c b/src/core/socket.c
index a387057473..c78e8ad01b 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -43,7 +43,6 @@
#include "def.h"
#include "smack-util.h"
#include "bus-util.h"
-#include "bus-error.h"
#include "selinux-util.h"
#include "dbus-socket.h"
#include "unit.h"
diff --git a/src/core/timer.c b/src/core/timer.c
index 7f4a2eb716..7027f83dfd 100644
--- a/src/core/timer.c
+++ b/src/core/timer.c
@@ -27,7 +27,6 @@
#include "dbus-timer.h"
#include "special.h"
#include "bus-util.h"
-#include "bus-error.h"
static const UnitActiveState state_translation_table[_TIMER_STATE_MAX] = {
[TIMER_DEAD] = UNIT_INACTIVE,
@@ -57,10 +56,7 @@ void timer_free_values(Timer *t) {
while ((v = t->values)) {
LIST_REMOVE(value, t->values, v);
-
- if (v->calendar_spec)
- calendar_spec_free(v->calendar_spec);
-
+ calendar_spec_free(v->calendar_spec);
free(v);
}
}