diff options
author | Marat Dukhan <marat@fb.com> | 2017-10-25 16:09:39 -0700 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2017-10-25 16:10:36 -0700 |
commit | 03f5c0b14e03a4c648f0386063eb7e87f6e1398b (patch) | |
tree | b28c8ab8e72a90108a01068a80cfa216124b6d0f /src | |
parent | 41a7e35aa791aa65c02466c01f0e12d44eef9a17 (diff) | |
download | cpuinfo-03f5c0b14e03a4c648f0386063eb7e87f6e1398b.tar.gz |
Minor refactoring in iOS GLES query
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/gles-ios.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/gles-ios.m b/src/gpu/gles-ios.m index 5cd1693..1dc8e6f 100644 --- a/src/gpu/gles-ios.m +++ b/src/gpu/gles-ios.m @@ -28,8 +28,8 @@ void cpuinfo_gpu_ios_query_gles2(char gpu_name[restrict static CPUINFO_GPU_NAME_ } } - const char* renderer_str = (const char*)glGetString(GL_RENDERER); - if (renderer_str) { + const char* renderer_str = (const char*) glGetString(GL_RENDERER); + if (renderer_str != NULL) { strncpy(gpu_name, renderer_str, CPUINFO_GPU_NAME_MAX - 1); gpu_name[CPUINFO_GPU_NAME_MAX - 1] = '\0'; cpuinfo_log_debug("GL_RENDERER: %s", renderer_str); |