From 7f89d8288952312adf410edc7e4b1e4142edcd74 Mon Sep 17 00:00:00 2001 From: v-dareck Date: Wed, 22 Feb 2017 11:51:31 -0800 Subject: [PATCH] Change errno check to ERROR_SUCCESS --- source/shared/core_results.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/shared/core_results.cpp b/source/shared/core_results.cpp index f0330584..488e9908 100644 --- a/source/shared/core_results.cpp +++ b/source/shared/core_results.cpp @@ -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 ) ); } @@ -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>( is.getloc()); + auto& facet = std::use_facet>( is.getloc() ); std::istreambuf_iterator beg( is ), end; std::ios_base::iostate err = std::ios_base::goodbit;