[Freeswitch-svn] [commit] r5680 - freeswitch/trunk/src
Freeswitch SVN
mikej at freeswitch.org
Wed Aug 29 21:52:05 EDT 2007
Author: mikej
Date: Wed Aug 29 21:52:05 2007
New Revision: 5680
Modified:
freeswitch/trunk/src/switch_odbc.c
Log:
silence picky compiler.
Modified: freeswitch/trunk/src/switch_odbc.c
==============================================================================
--- freeswitch/trunk/src/switch_odbc.c (original)
+++ freeswitch/trunk/src/switch_odbc.c Wed Aug 29 21:52:05 2007
@@ -415,14 +415,14 @@
SWITCH_DECLARE(char *) switch_odbc_handle_get_error(switch_odbc_handle_t *handle, SQLHSTMT stmt)
{
- char buffer[SQL_MAX_MESSAGE_LENGTH + 1];
- char sqlstate[SQL_SQLSTATE_SIZE + 1];
+ char buffer[SQL_MAX_MESSAGE_LENGTH + 1] = "";
+ char sqlstate[SQL_SQLSTATE_SIZE + 1] = "";
SQLINTEGER sqlcode;
SQLSMALLINT length;
char *ret = NULL;
if (SQLError(handle->env, handle->con, stmt, (SQLCHAR *)sqlstate, &sqlcode, (SQLCHAR *)buffer, sizeof(buffer), &length) == SQL_SUCCESS) {
- ret = switch_mprintf("STATE: %s CODE %ld ERROR: %s\n", switch_str_nil(sqlstate), sqlcode, switch_str_nil(buffer));
+ ret = switch_mprintf("STATE: %s CODE %ld ERROR: %s\n", sqlstate, sqlcode, buffer);
};
return ret;
More information about the Freeswitch-svn
mailing list