Module: wine
Branch: master
Commit: ca1d074c50493f032c60be627309e9b1eee53678
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ca1d074c50493f032c60be627…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Mon Feb 23 17:33:58 2009 -0600
dsound: Replace a realloc-or-alloc with a free-then-alloc.
The buffer is to be overwritten anyway, so there's no need to preserve its
contents. Also, the old code leaked if the realloc were to fail. All in all,
free-then-alloc is simpler.
---
dlls/dsound/buffer.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 038a90e..abff0c9 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -117,11 +117,8 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(
} else if (howmuch > 0) {
/* Make an internal copy of the caller-supplied array.
* Replace the existing copy if one is already present. */
- if (This->dsb->notifies)
- This->dsb->notifies = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
- This->dsb->notifies, howmuch * sizeof(DSBPOSITIONNOTIFY));
- else
- This->dsb->notifies = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
+ HeapFree(GetProcessHeap(), 0, This->dsb->notifies);
+ This->dsb->notifies = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
howmuch * sizeof(DSBPOSITIONNOTIFY));
if (This->dsb->notifies == NULL) {
Module: wine
Branch: master
Commit: 08637ac368baa1ad25ddbd83aa7b8f237c4dd32c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=08637ac368baa1ad25ddbd83a…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Tue Feb 24 00:04:48 2009 +0100
opengl32/tests: Use win_skip() to skip over unimplemented functionality.
---
dlls/opengl32/tests/opengl.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c
index a3ac3af..ffef769 100644
--- a/dlls/opengl32/tests/opengl.c
+++ b/dlls/opengl32/tests/opengl.c
@@ -311,7 +311,7 @@ static void test_colorbits(HDC hdc)
if (!pwglChoosePixelFormatARB)
{
- skip("wglChoosePixelFormatARB is not available\n");
+ win_skip("wglChoosePixelFormatARB is not available\n");
return;
}
@@ -345,7 +345,7 @@ static void test_gdi_dbuf(HDC hdc)
if (!pwglGetPixelFormatAttribivARB)
{
- skip("wglGetPixelFormatAttribivARB is not available\n");
+ win_skip("wglGetPixelFormatAttribivARB is not available\n");
return;
}
@@ -595,7 +595,7 @@ START_TEST(opengl)
/* The lack of wglGetExtensionsStringARB in general means broken software rendering or the lack of decent OpenGL support, skip tests in such cases */
if (!pwglGetExtensionsStringARB)
{
- skip("wglGetExtensionsStringARB is not available\n");
+ win_skip("wglGetExtensionsStringARB is not available\n");
return;
}
Module: wine
Branch: master
Commit: 9de60b9c2cb679967aba31ddf0c7e3d6ee01ec37
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9de60b9c2cb679967aba31ddf…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Tue Feb 24 00:03:32 2009 +0100
gdi32/tests: Use win_skip() to skip over unimplemented functionality.
---
dlls/gdi32/tests/dc.c | 2 +-
dlls/gdi32/tests/font.c | 18 +++++++++---------
dlls/gdi32/tests/icm.c | 8 ++++----
dlls/gdi32/tests/path.c | 6 +++---
4 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c
index 9e0048e..661246c 100644
--- a/dlls/gdi32/tests/dc.c
+++ b/dlls/gdi32/tests/dc.c
@@ -185,7 +185,7 @@ static void test_GdiConvertToDevmodeW(void)
pGdiConvertToDevmodeW = (void *)GetProcAddress(GetModuleHandleA("gdi32.dll"), "GdiConvertToDevmodeW");
if (!pGdiConvertToDevmodeW)
{
- skip("GdiConvertToDevmodeW is not available on this platform\n");
+ win_skip("GdiConvertToDevmodeW is not available on this platform\n");
return;
}
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 041a742..cc5e3f5 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -839,7 +839,7 @@ static void test_GdiGetCharDimensions(void)
if (!pGdiGetCharDimensions)
{
- skip("GdiGetCharDimensions not available on this platform\n");
+ win_skip("GdiGetCharDimensions not available on this platform\n");
return;
}
@@ -879,7 +879,7 @@ static void test_GetCharABCWidths(void)
if (!pGetCharABCWidthsW || !pGetCharABCWidthsI)
{
- skip("GetCharABCWidthsW/I not available on this platform\n");
+ win_skip("GetCharABCWidthsW/I not available on this platform\n");
return;
}
@@ -944,7 +944,7 @@ static void test_text_extents(void)
GetTextExtentExPointW(hdc, wt, 1, 1, &fit1, &fit2, &sz1);
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
- skip("Skipping remainder of text extents test on a Win9x platform\n");
+ win_skip("Skipping remainder of text extents test on a Win9x platform\n");
hfont = SelectObject(hdc, hfont);
DeleteObject(hfont);
ReleaseDC(0, hdc);
@@ -1002,7 +1002,7 @@ static void test_GetGlyphIndices(void)
HFONT hOldFont;
if (!pGetGlyphIndicesW) {
- skip("GetGlyphIndicesW not available on platform\n");
+ win_skip("GetGlyphIndicesW not available on platform\n");
return;
}
@@ -1137,7 +1137,7 @@ static void test_GetKerningPairs(void)
GetKerningPairsW(hdc, 0, NULL);
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
- skip("Skipping the GetKerningPairs test on a Win9x platform\n");
+ win_skip("Skipping the GetKerningPairs test on a Win9x platform\n");
ReleaseDC(0, hdc);
return;
}
@@ -1561,7 +1561,7 @@ static void test_font_charset(void)
if (!pGetGlyphIndicesA || !pGetGlyphIndicesW)
{
- skip("Skipping the font charset test on a Win9x platform\n");
+ win_skip("Skipping the font charset test on a Win9x platform\n");
return;
}
@@ -1606,7 +1606,7 @@ static void test_GetFontUnicodeRanges(void)
if (!pGetFontUnicodeRanges)
{
- skip("GetFontUnicodeRanges not available before W2K\n");
+ win_skip("GetFontUnicodeRanges not available before W2K\n");
return;
}
@@ -2511,7 +2511,7 @@ static void test_GetTextMetrics(void)
/* Report only once */
if(!pGetGlyphIndicesA)
- skip("GetGlyphIndicesA is unavailable, negative width will not be checked\n");
+ win_skip("GetGlyphIndicesA is unavailable, negative width will not be checked\n");
hdc = GetDC(0);
@@ -2672,7 +2672,7 @@ static void test_GdiRealizationInfo(void)
if(!pGdiRealizationInfo)
{
- skip("GdiRealizationInfo not available\n");
+ win_skip("GdiRealizationInfo not available\n");
return;
}
diff --git a/dlls/gdi32/tests/icm.c b/dlls/gdi32/tests/icm.c
index 424082c..06812aa 100644
--- a/dlls/gdi32/tests/icm.c
+++ b/dlls/gdi32/tests/icm.c
@@ -39,7 +39,7 @@ static void test_GetICMProfileA( HDC dc )
ret = GetICMProfileA( NULL, NULL, NULL );
if ( !ret && ( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) )
{
- skip( "GetICMProfileA is not implemented\n" );
+ win_skip( "GetICMProfileA is not implemented\n" );
return;
}
ok( !ret, "GetICMProfileA succeeded\n" );
@@ -91,7 +91,7 @@ static void test_GetICMProfileW( HDC dc )
ret = GetICMProfileW( NULL, NULL, NULL );
if ( !ret && ( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) )
{
- skip( "GetICMProfileW is not implemented\n" );
+ win_skip( "GetICMProfileW is not implemented\n" );
return;
}
ok( !ret, "GetICMProfileW succeeded\n" );
@@ -136,7 +136,7 @@ static void test_SetICMMode( HDC dc )
impl = GetICMProfileA( NULL, NULL, NULL );
if ( !impl && ( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) )
{
- skip( "On NT4 where SetICMMode is not implemented but this is not advertised\n" );
+ win_skip( "On NT4 where SetICMMode is not implemented but this is not advertised\n" );
return;
}
@@ -165,7 +165,7 @@ static void test_SetICMMode( HDC dc )
dc = CreateDCW( displayW, NULL, NULL, NULL );
if ( !dc && ( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) )
{
- skip( "CreateDCW is not implemented\n" );
+ win_skip( "CreateDCW is not implemented\n" );
return;
}
ok( dc != NULL, "CreateDCW failed (%d)\n", GetLastError() );
diff --git a/dlls/gdi32/tests/path.c b/dlls/gdi32/tests/path.c
index 58e8467..4a8ea6d 100644
--- a/dlls/gdi32/tests/path.c
+++ b/dlls/gdi32/tests/path.c
@@ -238,7 +238,7 @@ static void test_arcto(void)
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
/* ArcTo is only available on Win2k and later */
- skip("ArcTo is not available\n");
+ win_skip("ArcTo is not available\n");
goto done;
}
SetArcDirection(hdc, AD_COUNTERCLOCKWISE);
@@ -282,7 +282,7 @@ static void test_anglearc(void)
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
/* AngleArc is only available on Win2k and later */
- skip("AngleArc is not available\n");
+ win_skip("AngleArc is not available\n");
goto done;
}
AngleArc(hdc, 300, 300, 80, 150.0, -180.0);
@@ -355,7 +355,7 @@ static void test_polydraw(void)
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
/* PolyDraw is only available on Win2k and later */
- skip("PolyDraw is not available\n");
+ win_skip("PolyDraw is not available\n");
goto done;
}
expect(TRUE, retb);