From owner-svn-soc-all@FreeBSD.ORG Tue Jul 2 09:03:22 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2C85B3CF for ; Tue, 2 Jul 2013 09:03:22 +0000 (UTC) (envelope-from mattbw@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) by mx1.freebsd.org (Postfix) with ESMTP id 1E6B51E7B for ; Tue, 2 Jul 2013 09:03:22 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6293LUD006734 for ; Tue, 2 Jul 2013 09:03:21 GMT (envelope-from mattbw@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r6293LPM006719 for svn-soc-all@FreeBSD.org; Tue, 2 Jul 2013 09:03:21 GMT (envelope-from mattbw@FreeBSD.org) Date: Tue, 2 Jul 2013 09:03:21 GMT Message-Id: <201307020903.r6293LPM006719@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to mattbw@FreeBSD.org using -f From: mattbw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r253837 - soc2013/mattbw/backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2013 09:03:22 -0000 Author: mattbw Date: Tue Jul 2 09:03:21 2013 New Revision: 253837 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=253837 Log: (fixed?) clanged out some silly logic errors Modified: soc2013/mattbw/backend/query.c Modified: soc2013/mattbw/backend/query.c ============================================================================== --- soc2013/mattbw/backend/query.c Tue Jul 2 08:44:56 2013 (r253836) +++ soc2013/mattbw/backend/query.c Tue Jul 2 09:03:21 2013 (r253837) @@ -222,6 +222,8 @@ gchar *match_id; struct pkg *match_pkg; + match_id = NULL; + match_pkg = NULL; success = match(q, &match_id, &match_pkg); if (success == TRUE && match_id != NULL && match_pkg != NULL) emitter(match_pkg, match_id, q); @@ -361,11 +363,11 @@ * type flags in the state for later consumption. */ if (success == TRUE) { - if (q->data != NULL) + if (q->data == NULL) q->any_repo = TRUE; else if (strcmp(q->data, "installed") == 0) q->local_repo = TRUE; - else if (pkg_repo_find_ident(q->data) != NULL) { + else if (pkg_repo_find_ident(q->data) == NULL) { pk_backend_error_code(backend, PK_ERROR_ENUM_PACKAGE_ID_INVALID, "no such repository");