X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=graph_ident.c;h=7b57f5d2c6828ea25ee2b74d7f1ed859d0be621c;hb=765bbe76d57b127ca2e72e40af3e8123aeeb217c;hp=9252ebeae0e75a8e168a32c5df0bde96db840fcd;hpb=a38bcd4f039e3354add408ad44f592b709335fef;p=collection4.git diff --git a/graph_ident.c b/graph_ident.c index 9252ebe..7b57f5d 100644 --- a/graph_ident.c +++ b/graph_ident.c @@ -41,11 +41,21 @@ static char *part_copy_with_selector (const char *selector, /* {{{ */ /* Replace the ANY and ALL flags if requested and if the selecter actually * *is* that flag. */ - if ((flags & IDENT_FLAG_REPLACE_ANY) && IS_ANY (selector)) - return (strdup (part)); + if (IS_ANY (selector)) + { + if (flags & IDENT_FLAG_REPLACE_ANY) + return (strdup (part)); + else + return (strdup (selector)); + } - if ((flags & IDENT_FLAG_REPLACE_ALL) && IS_ALL (selector)) - return (strdup (part)); + if (IS_ALL (selector)) + { + if (flags & IDENT_FLAG_REPLACE_ALL) + return (strdup (part)); + else + return (strdup (selector)); + } if (strcmp (selector, part) != 0) return (NULL);