mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-16 05:07:06 +00:00
fix compiler warn
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15480 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
94b9866bfd
commit
d1604498ee
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#include <sqlite3.h>
|
#include <sqlite3.h>
|
||||||
|
|
||||||
static void db_pick_path(char *dbname, char *buf, switch_size_t size)
|
static void db_pick_path(const char *dbname, char *buf, switch_size_t size)
|
||||||
{
|
{
|
||||||
memset(buf, 0, size);
|
memset(buf, 0, size);
|
||||||
if (switch_is_file_path(dbname)) {
|
if (switch_is_file_path(dbname)) {
|
||||||
@ -200,7 +200,7 @@ SWITCH_DECLARE(switch_core_db_t *) switch_core_db_open_file(const char *filename
|
|||||||
switch_core_db_t *db;
|
switch_core_db_t *db;
|
||||||
char path[1024];
|
char path[1024];
|
||||||
|
|
||||||
db_pick_path((char *)filename, path, sizeof(path));
|
db_pick_path(filename, path, sizeof(path));
|
||||||
if (switch_core_db_open(path, &db)) {
|
if (switch_core_db_open(path, &db)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL ERR [%s]\n", switch_core_db_errmsg(db));
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL ERR [%s]\n", switch_core_db_errmsg(db));
|
||||||
switch_core_db_close(db);
|
switch_core_db_close(db);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user