summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-13 20:07:13 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-13 20:17:07 +0100
commit769d324c99aab129148bd25f5f663ef441287d86 (patch)
treee6d3335e4b7e59f47a248e64e17c507536ce223c /src/shared
parentdb9fd84944807ebea04363dada761613360fa6f9 (diff)
networkd: make IP forwarding for IPv4 and IPv6 individually configurable
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/conf-parser.c6
-rw-r--r--src/shared/util.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index a1a94da928..0b1af6c577 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -823,8 +823,7 @@ int config_parse_log_facility(
x = log_facility_unshifted_from_string(rvalue);
if (x < 0) {
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "Failed to parse log facility, ignoring: %s", rvalue);
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse log facility, ignoring: %s", rvalue);
return 0;
}
@@ -855,8 +854,7 @@ int config_parse_log_level(
x = log_level_from_string(rvalue);
if (x < 0) {
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "Failed to parse log level, ignoring: %s", rvalue);
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse log level, ignoring: %s", rvalue);
return 0;
}
diff --git a/src/shared/util.h b/src/shared/util.h
index b337249faa..850019ab9d 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -143,6 +143,10 @@ static inline const char* true_false(bool b) {
return b ? "true" : "false";
}
+static inline const char* one_zero(bool b) {
+ return b ? "1" : "0";
+}
+
static inline const char* strempty(const char *s) {
return s ? s : "";
}