X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fdelta%2Fdelta.c;h=16b10021b78f0159a57305eac4b091f95c4cc25a;hb=684ecf306a2a9749fd4be28170b7d83252e7c590;hp=9f20938516280f905153601af48010bcac6777d2;hpb=f274ece0f76b5709408821e317e87aef76123db6;p=elogind.git diff --git a/src/delta/delta.c b/src/delta/delta.c index 9f2093851..16b10021b 100644 --- a/src/delta/delta.c +++ b/src/delta/delta.c @@ -312,17 +312,17 @@ static int parse_flags(const char *flag_str, int flags) { size_t l; FOREACH_WORD(w, l, flag_str, state) { - if (strncmp("masked", w, l) == 0) + if (strneq("masked", w, l)) flags |= SHOW_MASKED; - else if (strncmp ("equivalent", w, l) == 0) + else if (strneq ("equivalent", w, l)) flags |= SHOW_EQUIVALENT; - else if (strncmp("redirected", w, l) == 0) + else if (strneq("redirected", w, l)) flags |= SHOW_REDIRECTED; - else if (strncmp("overridden", w, l) == 0) + else if (strneq("overridden", w, l)) flags |= SHOW_OVERRIDDEN; - else if (strncmp("unchanged", w, l) == 0) + else if (strneq("unchanged", w, l)) flags |= SHOW_UNCHANGED; - else if (strncmp("default", w, l) == 0) + else if (strneq("default", w, l)) flags |= SHOW_DEFAULTS; else return -EINVAL;