summaryrefslogtreecommitdiff
path: root/mg_db_gd_sqlite.c
diff options
context:
space:
mode:
Diffstat (limited to 'mg_db_gd_sqlite.c')
-rw-r--r--mg_db_gd_sqlite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mg_db_gd_sqlite.c b/mg_db_gd_sqlite.c
index d5a6be1..edc7272 100644
--- a/mg_db_gd_sqlite.c
+++ b/mg_db_gd_sqlite.c
@@ -266,7 +266,7 @@ mgDecade(sqlite3_context *context, int argc, sqlite3_value **argv)
assert(argc==1);
unsigned int year=sqlite3_value_int(argv[0]);
char *buf;
- asprintf(&buf,"%02d",(year-year%10)%100);
+ msprintf(&buf,"%02d",(year-year%10)%100);
sqlite3_result_text(context,buf,2,free);
}
@@ -341,7 +341,7 @@ bool
mgDbGd::FieldExists(string table, string field)
{
char *b;
- asprintf(&b,"SELECT %s FROM %s LIMIT 1",field.c_str(),table.c_str());
+ msprintf(&b,"SELECT %s FROM %s LIMIT 1",field.c_str(),table.c_str());
mgQuery q(m_db,b,mgQuerySilent);
free(b);
return q.ErrorMessage().empty();