diff --git a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLGraphicsConfig.m b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLGraphicsConfig.m index 18cfd567533..4d3ea837201 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLGraphicsConfig.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLGraphicsConfig.m @@ -77,9 +77,8 @@ J2dRlsTraceLn(J2D_TRACE_INFO, "MTLGraphicsConfig_initMTL"); FILE *f = popen("system_profiler SPDisplaysDataType", "r"); - int ch = getc(f); bool metalSupport = FALSE; - while (ch != EOF) + while (getc(f) != EOF) { char str[60]; @@ -95,10 +94,10 @@ } pclose(f); if (!metalSupport) { - fprintf(stderr, "Metal support not present"); + fprintf(stderr, "Metal support not present\n"); return JNI_FALSE; } else { - fprintf(stderr, "Metal support is present"); + fprintf(stderr, "Metal support is present\n"); } if (!MTLFuncs_OpenLibrary()) {