[Commits] SDL: Fixed formatting, added actual count to SDL error message

libsdl.org revision control commits-owner at libsdl.org
Wed Jan 17 13:03:44 PST 2018


details:   https://hg.libsdl.org/SDL/rev/da1ca77eb713
changeset: 11828:da1ca77eb713
user:      Sam Lantinga <slouken at libsdl.org>
date:      Wed Jan 17 13:12:39 2018 -0800
description:
Fixed formatting, added actual count to SDL error message

diffstat:

 src/video/SDL_vulkan_utils.c |  16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diffs (33 lines):

diff -r 922c27f2fa56 -r da1ca77eb713 src/video/SDL_vulkan_utils.c
--- a/src/video/SDL_vulkan_utils.c	Sun Jan 14 13:34:50 2018 +0000
+++ b/src/video/SDL_vulkan_utils.c	Wed Jan 17 13:12:39 2018 -0800
@@ -152,18 +152,14 @@
                                                  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 @@
 }
 
 #endif
+
+/* vi: set ts=4 sw=4 expandtab: */


More information about the commits mailing list