Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jul 2013 09:03:21 GMT
From:      mattbw@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r253837 - soc2013/mattbw/backend
Message-ID:  <201307020903.r6293LPM006719@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307020903.r6293LPM006719>