summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-02-12 21:47:36 +0100
committerLennart Poettering <lennart@poettering.net>2013-02-13 00:56:13 +0100
commit641906e9366891e0ad3e6e38b7396a427678c4cf (patch)
tree47f90e01b79c50ab0839f0a0a10a8fae81dd9a25 /src/core/load-fragment.c
parent8d6167101696a28b7ac61b48fd2c1920564c4e90 (diff)
use strneq instead of strncmp
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 44698d46e5..6e333aaf15 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -459,7 +459,7 @@ int config_parse_exec(
k = 0;
FOREACH_WORD_QUOTED(w, l, rvalue, state) {
- if (strncmp(w, ";", MAX(l, 1U)) == 0)
+ if (strneq(w, ";", MAX(l, 1U)))
break;
k++;
@@ -471,9 +471,9 @@ int config_parse_exec(
k = 0;
FOREACH_WORD_QUOTED(w, l, rvalue, state) {
- if (strncmp(w, ";", MAX(l, 1U)) == 0)
+ if (strneq(w, ";", MAX(l, 1U)))
break;
- else if (strncmp(w, "\\;", MAX(l, 1U)) == 0)
+ else if (strneq(w, "\\;", MAX(l, 1U)))
w ++;
if (honour_argv0 && w == rvalue) {
@@ -2670,7 +2670,7 @@ void unit_dump_config_items(FILE *f) {
prefix_len = dot-i;
if (dot)
- if (!prev || strncmp(prev, i, prefix_len+1) != 0) {
+ if (!prev || !strneq(prev, i, prefix_len+1)) {
if (prev)
fputc('\n', f);