From 509db8afbdde8fae01394665b63e2f5ad916db74 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 17 Jan 2018 13:12:39 -0800 Subject: [PATCH] Fixed formatting, added actual count to SDL error message --- src/video/SDL_vulkan_utils.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/video/SDL_vulkan_utils.c b/src/video/SDL_vulkan_utils.c index 9228378faa1fa..d4cbed4d9f58d 100644 --- a/src/video/SDL_vulkan_utils.c +++ b/src/video/SDL_vulkan_utils.c @@ -152,18 +152,14 @@ SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount, unsigned nameCount, const char *const *names) { - if(userNames) - { - unsigned int i; + if (userNames) { + unsigned i; - if(*userCount < nameCount) - { - SDL_SetError( - "Ouput array for SDL_Vulkan_GetInstanceExtensions is too small"); + if (*userCount < nameCount) { + SDL_SetError("Output array for SDL_Vulkan_GetInstanceExtensions needs to be at least %d big", nameCount); return SDL_FALSE; } - for(i = 0; i < nameCount; i++) - { + for (i = 0; i < nameCount; i++) { userNames[i] = names[i]; } } @@ -172,3 +168,5 @@ SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount, } #endif + +/* vi: set ts=4 sw=4 expandtab: */