X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgraph_ident.c;h=be3cbfd0268e5573c0518f77cc47ab888e49a3b7;hb=ac284c5c84056ffeb0bb81240fb7dac3eb65f2d4;hp=cb9a3618fb30d19bf87ca183ee60233db296bda4;hpb=16078f690bbc4379460c49b1f059a46a2c2b35a2;p=collection4.git diff --git a/src/graph_ident.c b/src/graph_ident.c index cb9a361..be3cbfd 100644 --- a/src/graph_ident.c +++ b/src/graph_ident.c @@ -1,3 +1,26 @@ +/** + * collection4 - graph_ident.c + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Florian octo Forster + **/ + #include #include #include @@ -377,12 +400,8 @@ int ident_compare (const graph_ident_t *i0, /* {{{ */ _Bool ident_matches (const graph_ident_t *selector, /* {{{ */ const graph_ident_t *ident) { - if ((selector == NULL) && (ident == NULL)) + if ((selector == NULL) || (ident == NULL)) return (0); - else if (selector == NULL) - return (-1); - else if (ident == NULL) - return (1); if (!part_matches (selector->host, ident->host)) return (0);