From 1f39252d27172ff8d8c1746897701b0a6b37be97 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 13 Jun 2006 14:11:48 +0200 Subject: [PATCH] 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 c108868fb30..c16694760b4 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 szName, INT index) 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 szName, INT index) (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 08ab4b5a6c3..8fd40a25e8c 100644 --- a/dlls/wineps.drv/ppd.c +++ b/dlls/wineps.drv/ppd.c @@ -535,11 +535,7 @@ static INT PSDRV_AddSlot(PPD *ppd, LPSTR szName, LPSTR szFullName, 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;