From: Michael Schroeder Date: Tue, 12 Feb 2013 19:02:04 +0000 (+0100) Subject: cosmetics: always return 0 in selection_make if the selection is empty X-Git-Tag: BASE-SuSE-Code-12_3-Branch~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9479459e0d255af627f0310b2407b04d653fff3f;p=thirdparty%2Flibsolv.git cosmetics: always return 0 in selection_make if the selection is empty --- diff --git a/src/selection.c b/src/selection.c index 426b7316..ffd2d0a7 100644 --- a/src/selection.c +++ b/src/selection.c @@ -737,7 +737,8 @@ selection_make(Pool *pool, Queue *selection, const char *name, int flags) ret = selection_depglob_arch(pool, selection, name, flags); if (!ret && (flags & SELECTION_CANON) != 0) ret = selection_canon(pool, selection, name, flags); - + if (ret && !selection->count) + ret = 0; /* no match -> always return zero */ if (ret && (flags & SELECTION_FLAT) != 0) selection_flatten(pool, selection); return ret;