From c8d7ae6bf8f2d0946f8955d1d0f8de3a18306e23 Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Thu, 19 Oct 2017 16:02:57 +0100 Subject: Only use printf family when passing arguments This avoids any unnecessary allocations when simply passing static strings to be printed onto stderr, and uses the simpler fputs mechanism. Signed-off-by: Ikey Doherty --- test/wgl_core_and_exts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/wgl_core_and_exts.c') diff --git a/test/wgl_core_and_exts.c b/test/wgl_core_and_exts.c index 043a911..7d22acc 100644 --- a/test/wgl_core_and_exts.c +++ b/test/wgl_core_and_exts.c @@ -35,11 +35,11 @@ test_function(HDC hdc) ctx = wglCreateContext(hdc); if (!ctx) { - fprintf(stderr, "Failed to create wgl context\n"); + fputs("Failed to create wgl context\n", stderr); return 1; } if (!wglMakeCurrent(hdc, ctx)) { - fprintf(stderr, "Failed to make context current\n"); + fputs("Failed to make context current\n", stderr); return 1; } @@ -48,7 +48,7 @@ test_function(HDC hdc) val = 0; glGetIntegerv(GL_LIGHTING, &val); if (!val) { - fprintf(stderr, "Enabling GL_LIGHTING didn't stick.\n"); + fputs("Enabling GL_LIGHTING didn't stick.\n", stderr); pass = false; } -- cgit v1.2.1