Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
style(9) fix to recently committed code -- don't use _t on typedefs
Matthew Seaman committed 13 years ago
commit fbea220a819364207b0bac019acb4dc58211b39e
parent 516d1c4
3 files changed +15 -15
modified libpkg/pkg_repo.c
@@ -43,7 +43,7 @@
#include "private/utils.h"
#include "private/pkg.h"

-
typedef enum _sql_prstmt_index_t {
+
typedef enum _sql_prstmt_index {
	PKG = 0,
	DEPS,
	CAT1,
@@ -57,9 +57,9 @@ typedef enum _sql_prstmt_index_t {
	VERSION,
	DELETE,
	PRSTMT_LAST,
-
} sql_prstmt_index_t;
+
} sql_prstmt_index;

-
static sql_prstmt_t sql_prepared_statements[PRSTMT_LAST] = {
+
static sql_prstmt sql_prepared_statements[PRSTMT_LAST] = {
	[PKG] = {
		NULL,
		"INSERT INTO packages ("
@@ -411,7 +411,7 @@ initialize_repo(const char *repodb, sqlite3 **sqlite)
static int
initialize_prepared_statements(sqlite3 *sqlite)
{
-
	sql_prstmt_index_t i;
+
	sql_prstmt_index i;
	int retcode = EPKG_OK;

	for (i = 0; i < PRSTMT_LAST; i++)
@@ -428,7 +428,7 @@ initialize_prepared_statements(sqlite3 *sqlite)
}

static int
-
run_prepared_statement(sql_prstmt_index_t s, ...)
+
run_prepared_statement(sql_prstmt_index s, ...)
{
	int retcode;	/* Returns SQLITE error code */
	va_list ap;
@@ -466,7 +466,7 @@ run_prepared_statement(sql_prstmt_index_t s, ...)
static void
finalize_prepared_statements(void)
{
-
	sql_prstmt_index_t i;
+
	sql_prstmt_index i;

	for (i = 0; i < PRSTMT_LAST; i++)
	{
modified libpkg/pkgdb.c
@@ -74,7 +74,7 @@ static bool is_attached(sqlite3 *, const char *);
static void report_already_installed(sqlite3 *);
static int sqlcmd_init(sqlite3 *db, __unused const char **err, __unused const void *noused);
static int prstmt_initialize(struct pkgdb *db);
-
/* static int run_prstmt(sql_prstmt_index_t s, ...); */
+
/* static int run_prstmt(sql_prstmt_index s, ...); */
static void prstmt_finalize(struct pkgdb *db);

extern int sqlite3_shell(int, char**);
@@ -1479,7 +1479,7 @@ pkgdb_load_mtree(struct pkgdb *db, struct pkg *pkg)
	return (load_val(db->sqlite, pkg, sql, PKG_LOAD_MTREE, pkg_set_mtree, -1));
}

-
typedef enum _sql_prstmt_index_t {
+
typedef enum _sql_prstmt_index {
	MTREE = 0,
	PKG,
	DEPS_UPDATE,
@@ -1500,9 +1500,9 @@ typedef enum _sql_prstmt_index_t {
	SHLIBS1,
	SHLIBS2,
	PRSTMT_LAST,
-
} sql_prstmt_index_t;
+
} sql_prstmt_index;

-
static sql_prstmt_t sql_prepared_statements[PRSTMT_LAST] = {
+
static sql_prstmt sql_prepared_statements[PRSTMT_LAST] = {
	[MTREE] = {
		NULL,
		"INSERT OR IGNORE INTO mtree(content) VALUES(?1)",
@@ -1620,7 +1620,7 @@ static sql_prstmt_t sql_prepared_statements[PRSTMT_LAST] = {
static int
prstmt_initialize(struct pkgdb *db)
{
-
	sql_prstmt_index_t i;
+
	sql_prstmt_index i;
	sqlite3 *sqlite;

	assert(db != NULL);
@@ -1642,7 +1642,7 @@ prstmt_initialize(struct pkgdb *db)
}

static int
-
run_prstmt(sql_prstmt_index_t s, ...)
+
run_prstmt(sql_prstmt_index s, ...)
{
	int retcode;	/* Returns SQLITE error code */
	va_list ap;
@@ -1683,7 +1683,7 @@ run_prstmt(sql_prstmt_index_t s, ...)
static void
prstmt_finalize(struct pkgdb *db)
{
-
	sql_prstmt_index_t i;
+
	sql_prstmt_index i;

	for (i = 0; i < PRSTMT_LAST; i++)
	{
modified libpkg/private/pkg.h
@@ -163,11 +163,11 @@ struct pkg_shlib {

/* sql helpers */

-
typedef struct _sql_prstmt_t {
+
typedef struct _sql_prstmt {
	sqlite3_stmt *stmt;
	const char *sql;
	const char *argtypes;
-
} sql_prstmt_t;
+
} sql_prstmt;

#define STMT(x) (sql_prepared_statements[(x)].stmt)
#define SQL(x)  (sql_prepared_statements[(x)].sql)