Skip to content

Commit

Permalink
Change errno check to ERROR_SUCCESS
Browse files Browse the repository at this point in the history
  • Loading branch information
v-dareck committed Feb 22, 2017
1 parent 043d1ec commit 7f89d82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/shared/core_results.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ std::string getUTF8StringFromString( const SQLWCHAR* source )
std::string str;
while ( source[i] )
{
memset( c_str, 0, sizeof( c_str ));
memset( c_str, 0, sizeof( c_str ) );
DWORD rc;
int cch = 0;
errno_t err = mplat_wctomb_s( &cch, c_str, sizeof( c_str ), source[i++] );
if (cch > 0 && err == 0)
if ( cch > 0 && err == ERROR_SUCCESS )
{
str.append( std::string( c_str, cch ) );
}
Expand Down Expand Up @@ -296,7 +296,7 @@ SQLRETURN string_to_number( Char* string_data, SQLLEN str_len, _Out_ void* buffe
std::locale loc; // default locale should match system
is.imbue( loc );

auto& facet = std::use_facet<std::num_get<char>>( is.getloc());
auto& facet = std::use_facet<std::num_get<char>>( is.getloc() );
std::istreambuf_iterator<char> beg( is ), end;
std::ios_base::iostate err = std::ios_base::goodbit;

Expand Down

0 comments on commit 7f89d82

Please sign in to comment.