Address janvorli's feedback comments
authorAdeel <adeelbm@outlook.com>
Mon, 25 Feb 2019 12:40:06 +0000 (04:40 -0800)
committerAdeel <adeelbm@outlook.com>
Mon, 25 Feb 2019 12:41:04 +0000 (04:41 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/805c8b231e0b8354b3997e81a779604fa1897c4e

src/coreclr/src/debug/createdump/datatarget.cpp
src/coreclr/tests/src/Interop/PInvoke/Decimal/PInvoke/DecNative.cpp
src/coreclr/tests/src/Interop/PInvoke/Decimal/ReversePInvoke/RevNative.cpp

index 9345450..35b582e 100644 (file)
@@ -150,8 +150,8 @@ DumpDataTarget::ReadVirtual(
     /* [optional][out] */ ULONG32 *done)
 {
     assert(m_fd != -1);
-    size_t read = pread64(m_fd, buffer, size, (off64_t)(ULONG_PTR)address);
-    if (read == (size_t)-1)
+    ssize_t read = pread64(m_fd, buffer, size, (off64_t)(ULONG_PTR)address);
+    if (read == -1)
     {
         *done = 0;
         return E_FAIL;
index 875d580..3502cbf 100644 (file)
@@ -10,7 +10,7 @@ DECIMAL g_DECIMAL_MaxValue = { 0, {{ 0, 0 }}, static_cast<int>(0xffffffff), {{st
 DECIMAL g_DECIMAL_MinValue  = { 0, {{ 0, DECIMAL_NEG }}, static_cast<int>(0xffffffff), {{static_cast<int>(0xffffffff), static_cast<int>(0xffffffff)}} };
 DECIMAL g_DECIMAL_Zero = { 0 };
 
-CY g_CY_MaxValue = { { static_cast<int>(0xffffffff), static_cast<int>(0x7fffffff) } };
+CY g_CY_MaxValue = { { static_cast<int>(0xffffffff), 0x7fffffff} };
 CY g_CY_MinValue = { { (LONG)0x00000000, (LONG)0x80000000 } };
 CY g_CY_Zero = { { 0 } };
 
index d586bfa..d28b631 100644 (file)
@@ -10,7 +10,7 @@ DECIMAL g_DECIMAL_MaxValue = { 0, {{ 0, 0 }}, static_cast<int>(0xffffffff), {{st
 DECIMAL g_DECIMAL_MinValue  = { 0, {{ 0, DECIMAL_NEG }}, static_cast<int>(0xffffffff), {{static_cast<int>(0xffffffff), static_cast<int>(0xffffffff) }}};
 DECIMAL g_DECIMAL_Zero = { 0 };
 
-CY g_CY_MaxValue = { {static_cast<int>(0xffffffff), static_cast<int>(0x7fffffff)} };
+CY g_CY_MaxValue = { {static_cast<int>(0xffffffff), 0x7fffffff} };
 CY g_CY_MinValue = { {(LONG)0x00000000, (LONG)0x80000000} };
 CY g_CY_Zero = { {0} };