Skip to content
Permalink
Browse files

Fixed analyzer warning "Call to 'calloc' has an allocation size of 0 …

…bytes"
  • Loading branch information
slouken committed Aug 28, 2017
1 parent 3c7f9d6 commit edaa0ef53f681060cc347e0f3fd4f6b1a148fc4a

File 1 of 1 in edaa0ef

@@ -133,14 +133,11 @@ VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList(
if(count == 0)
{
retval = SDL_calloc(1, sizeof(VkExtensionProperties)); // so we can return non-null
if(!retval)
{
SDL_OutOfMemory();
return NULL;
}
*extensionCount = 0;
}
retval = SDL_calloc(count, sizeof(VkExtensionProperties));
else
{
retval = SDL_calloc(count, sizeof(VkExtensionProperties));
}
if(!retval)
{
SDL_OutOfMemory();

0 comments on commit edaa0ef

Please sign in to comment.