socsvn commit: r254443 - in soc2013/mattbw/backend: . query

mattbw at FreeBSD.org mattbw at FreeBSD.org
Tue Jul 9 05:13:16 UTC 2013


Author: mattbw
Date: Tue Jul  9 05:13:15 2013
New Revision: 254443
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=254443

Log:
  some more splint tidying

Modified:
  soc2013/mattbw/backend/licenses.c
  soc2013/mattbw/backend/query/core.h
  soc2013/mattbw/backend/query/match.c

Modified: soc2013/mattbw/backend/licenses.c
==============================================================================
--- soc2013/mattbw/backend/licenses.c	Tue Jul  9 05:06:46 2013	(r254442)
+++ soc2013/mattbw/backend/licenses.c	Tue Jul  9 05:13:15 2013	(r254443)
@@ -59,14 +59,14 @@
 	lic = NULL;
 	sb = sbuf_new_auto();
 	while (pkg_licenses(pkg, &lic) == EPKG_OK) {
-		sbuf_cat(sb, logic_str);
-		sbuf_cat(sb, pkg_license_name(lic));
+		(void)sbuf_cat(sb, logic_str);
+		(void)sbuf_cat(sb, pkg_license_name(lic));
 	}
 	/* Stop the following code from bombing if there was no license
 	 * available.
 	 */
 	if (sbuf_len(sb) == 0)
-		sbuf_cat(sb, logic_str);
+		(void)sbuf_cat(sb, logic_str);
 
 	sb_err = sbuf_finish(sb);
 	/* Make sure that we remove the initial logic string instance! */

Modified: soc2013/mattbw/backend/query/core.h
==============================================================================
--- soc2013/mattbw/backend/query/core.h	Tue Jul  9 05:06:46 2013	(r254442)
+++ soc2013/mattbw/backend/query/core.h	Tue Jul  9 05:13:15 2013	(r254443)
@@ -21,7 +21,7 @@
 #ifndef _PKGNG_BACKEND_QUERY_CORE_H_
 #define _PKGNG_BACKEND_QUERY_CORE_H_
 
-#include <glib.h>
+#include <stdbool.h>
 #include "../pk-backend.h"
 #include "pkg.h"
 
@@ -47,11 +47,10 @@
 struct query_source {
 	enum query_source_type type;
 	union {
+		bool		unused;
 		gchar          *single;
 	}		data;
 
-	query_body_ptr	body;
-
 	/* Information about this query's position in a set of subqueries. */
 	unsigned int	position;
 	unsigned int	total;

Modified: soc2013/mattbw/backend/query/match.c
==============================================================================
--- soc2013/mattbw/backend/query/match.c	Tue Jul  9 05:06:46 2013	(r254442)
+++ soc2013/mattbw/backend/query/match.c	Tue Jul  9 05:13:15 2013	(r254443)
@@ -37,11 +37,14 @@
 	struct query_source s;
 	struct query_target t;
 
+	s.data.unused = true;
+	s.position = 0;
+	s.total = 1;
 	s.type = QUERY_BACKEND_IDS;
 
-	t.type = QUERY_EMIT;
-	t.data.emit.load_flags = load_flags;
 	t.data.emit.f = emitter;
+	t.data.emit.load_flags = load_flags;
+	t.type = QUERY_EMIT;
 
 	return query_do(backend, &s, &t);
 }
@@ -58,11 +61,14 @@
 	struct query_source s;
 	struct query_target t;
 
+	s.data.unused = true;
+	s.position = 0;
+	s.total = 1;
 	s.type = QUERY_BACKEND_IDS;
 
-	t.type = QUERY_JOB;
-	t.data.job.type = type;
 	t.data.job.f = emitter;
+	t.data.job.type = type;
+	t.type = QUERY_JOB;
 
 	return query_do(backend, &s, &t);
 }


More information about the svn-soc-all mailing list