[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r35379 - in trunk/subversion: include/private libsvn_fs_fs libsvn_subr

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 21 Jan 2009 21:04:53 +0100

On Wed, Jan 21, 2009 at 19:52, Hyrum K. Wright <hyrum_at_hyrumwright.org> wrote:
>...
> +++ trunk/subversion/libsvn_subr/sqlite.c Wed Jan 21 10:52:27 2009 (r35379)
> @@ -50,6 +50,10 @@ sqlite_tracer(void *data, const char *sq
> struct svn_sqlite__db_t
> {
> sqlite3 *db3;
> + const char **statement_strings;

You changed this decl in a later revision to:

  const char * const *statement_strings;

but the argument uses [] ... maybe do the same here?

>...
> svn_error_t *
> +svn_sqlite__get_statement(svn_sqlite__stmt_t **stmt, svn_sqlite__db_t *db,
> + int stmt_idx)
> +{
> + if (db->prepared_stmts[stmt_idx] == NULL)
> + SVN_ERR(svn_sqlite__prepare(&db->prepared_stmts[stmt_idx], db,
> + db->statement_strings[stmt_idx], db->pool));

Before the if, maybe add:

  SVN_ERR_ASSERT(stmt_idx < db->nbr_statements);

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1041930
Received on 2009-01-21 21:05:15 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.