Sync with trunk r63270.
[reactos.git] / lib / sdk / crt / string / itoa.c
index e2f5918..0d6e0e5 100644 (file)
@@ -113,10 +113,7 @@ int CDECL _i64toa_s(__int64 value, char *str, size_t size, int radix)
             *p++ = *pos--;
 
         str[0] = '\0';
-        MSVCRT_INVALID_PMT("str[size] is too small");
-#ifndef _LIBCNT_
-        *_errno() = ERANGE;
-#endif
+        MSVCRT_INVALID_PMT("str[size] is too small", ERANGE);
         return ERANGE;
     }
 
@@ -182,10 +179,7 @@ int CDECL _ui64toa_s(unsigned __int64 value, char *str,
     }while(value != 0);
 
     if((unsigned)(buffer-pos+65) > size) {
-        MSVCRT_INVALID_PMT("str[size] is too small");
-#ifndef _LIBCNT_
-        *_errno() = EINVAL;
-#endif
+        MSVCRT_INVALID_PMT("str[size] is too small", EINVAL);
         return EINVAL;
     }
 
@@ -322,10 +316,7 @@ int CDECL _ltoa_s(long value, char *str, size_t size, int radix)
             *p++ = *pos--;
 
         str[0] = '\0';
-        MSVCRT_INVALID_PMT("str[size] is too small");
-#ifndef _LIBCNT_
-        *_errno() = EINVAL;
-#endif
+        MSVCRT_INVALID_PMT("str[size] is too small", ERANGE);
         return ERANGE;
     }