mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 01:16:26 +00:00
Fixed analyzer warning "Call to 'calloc' has an allocation size of 0 bytes"
This commit is contained in:
@@ -133,14 +133,11 @@ VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList(
|
|||||||
if(count == 0)
|
if(count == 0)
|
||||||
{
|
{
|
||||||
retval = SDL_calloc(1, sizeof(VkExtensionProperties)); // so we can return non-null
|
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)
|
if(!retval)
|
||||||
{
|
{
|
||||||
SDL_OutOfMemory();
|
SDL_OutOfMemory();
|
||||||
|
Reference in New Issue
Block a user