From owner-svn-soc-all@FreeBSD.ORG Tue Jul 9 05:13:16 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 3BAD5A12 for ; Tue, 9 Jul 2013 05:13:16 +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 12C321826 for ; Tue, 9 Jul 2013 05:13:16 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r695DFxX085220 for ; Tue, 9 Jul 2013 05:13:15 GMT (envelope-from mattbw@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r695DF71085216 for svn-soc-all@FreeBSD.org; Tue, 9 Jul 2013 05:13:15 GMT (envelope-from mattbw@FreeBSD.org) Date: Tue, 9 Jul 2013 05:13:15 GMT Message-Id: <201307090513.r695DF71085216@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: r254443 - in soc2013/mattbw/backend: . query 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, 09 Jul 2013 05:13:16 -0000 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 +#include #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); }