VS2010 fixes.
This commit is contained in:
parent
7325b15786
commit
f31fc65e1d
|
@ -92,17 +92,17 @@ static void cbuf_append_bytes(struct command_buffer* buf, const char* msg, size_
|
|||
|
||||
static void cbuf_append(struct command_buffer* buf, const char* msg)
|
||||
{
|
||||
uhub_assert(buf->flags == 0);
|
||||
size_t len = strlen(msg);
|
||||
uhub_assert(buf->flags == 0);
|
||||
cbuf_append_bytes(buf, msg, len);
|
||||
}
|
||||
|
||||
static void cbuf_append_format(struct command_buffer* buf, const char* format, ...)
|
||||
{
|
||||
uhub_assert(buf->flags == 0);
|
||||
static char tmp[1024];
|
||||
va_list args;
|
||||
int bytes;
|
||||
uhub_assert(buf->flags == 0);
|
||||
va_start(args, format);
|
||||
bytes = vsnprintf(tmp, 1024, format, args);
|
||||
va_end(args);
|
||||
|
@ -330,8 +330,8 @@ parse_arguments_error:
|
|||
|
||||
static struct command_handle* command_get_handler(struct command_base* cbase, const char* prefix, const struct hub_user* user, struct hub_command* cmd)
|
||||
{
|
||||
uhub_assert(cmd != NULL);
|
||||
struct command_handle* handler = NULL;
|
||||
uhub_assert(cmd != NULL);
|
||||
|
||||
if (prefix && prefix[0] && prefix[1])
|
||||
{
|
||||
|
|
|
@ -218,8 +218,9 @@ int plugin_register(struct plugin_handle* plugin, const char* config)
|
|||
|
||||
int plugin_unregister(struct plugin_handle* plugin)
|
||||
{
|
||||
struct sql_data* sql;
|
||||
set_error_message(plugin, 0);
|
||||
struct sql_data* sql = (struct sql_data*) plugin->ptr;
|
||||
sql = (struct sql_data*) plugin->ptr;
|
||||
sqlite3_close(sql->db);
|
||||
hub_free(sql);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue