summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a38bcd4)
raw | patch | inline | side by side (parent: a38bcd4)
author | Florian Forster <ff@octo.it> | |
Mon, 14 Jun 2010 15:47:56 +0000 (17:47 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 14 Jun 2010 15:47:56 +0000 (17:47 +0200) |
graph_ident.c | patch | blob | history |
diff --git a/graph_ident.c b/graph_ident.c
index 9252ebeae0e75a8e168a32c5df0bde96db840fcd..7b57f5d2c6828ea25ee2b74d7f1ed859d0be621c 100644 (file)
--- a/graph_ident.c
+++ b/graph_ident.c
/* 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);