Module: wine Branch: refs/heads/master Commit: 1f39252d27172ff8d8c1746897701b0a6b37be97 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=1f39252d27172ff8d8c17468...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Jun 13 14:11:48 2006 +0200
wineps.drv: Don't use sizeof in traces to avoid printf format warnings.
---
dlls/wineps.drv/glyphlist.c | 15 ++------------- dlls/wineps.drv/ppd.c | 6 +----- 2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/dlls/wineps.drv/glyphlist.c b/dlls/wineps.drv/glyphlist.c index c108868..c166947 100644 --- a/dlls/wineps.drv/glyphlist.c +++ b/dlls/wineps.drv/glyphlist.c @@ -58,11 +58,7 @@ INT PSDRV_GlyphListInit() TRACE("glyphList will initially hold %i glyph names\n", i);
glyphList = HeapAlloc(PSDRV_Heap, 0, i * sizeof(GLYPHNAME *)); - if (glyphList == NULL) - { - ERR("Failed to allocate %i bytes of memory\n", i * sizeof(GLYPHNAME *)); - return 1; - } + if (glyphList == NULL) return 1;
for (i = 0; i < glyphListSize; ++i) glyphList[i] = PSDRV_AGLGlyphNames + i; @@ -82,12 +78,7 @@ inline static INT GlyphListInsert(LPCSTR GLYPHNAME *g;
g = HeapAlloc(PSDRV_Heap, 0, sizeof(GLYPHNAME) + strlen(szName) + 1); - if (g == NULL) - { - ERR("Failed to allocate %i bytes of memory\n", - sizeof(GLYPHNAME) + strlen(szName) + 1); - return -1; - } + if (g == NULL) return -1;
g->index = -1; g->sz = (LPSTR)(g + 1); @@ -101,8 +92,6 @@ inline static INT GlyphListInsert(LPCSTR (glyphListSize + GLYPHLIST_ALLOCSIZE) * sizeof(GLYPHNAME *)); if (newGlyphList == NULL) { - ERR("Failed to allocate %i bytes of memory\n", (glyphListSize + - GLYPHLIST_ALLOCSIZE) * sizeof (GLYPHNAME *)); HeapFree(PSDRV_Heap, 0, g); return -1; } diff --git a/dlls/wineps.drv/ppd.c b/dlls/wineps.drv/ppd.c index 08ab4b5..8fd40a2 100644 --- a/dlls/wineps.drv/ppd.c +++ b/dlls/wineps.drv/ppd.c @@ -535,11 +535,7 @@ static INT PSDRV_AddSlot(PPD *ppd, LPSTR insert = &((*insert)->next);
slot = *insert = HeapAlloc(PSDRV_Heap, HEAP_ZERO_MEMORY, sizeof(INPUTSLOT)); - if (!slot) - { - ERR("Failed to allocate %i bytes of memory\n", sizeof(INPUTSLOT)); - return 1; - } + if (!slot) return 1;
slot->Name = szName; slot->FullName = szFullName;