mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Replaced all uses of malloc with calloc.
This commit is contained in:
+2
-2
@@ -43,7 +43,7 @@
|
||||
void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
|
||||
{
|
||||
uint32_t i, size = CGDisplayGammaTableCapacity(monitor->ns.displayID);
|
||||
CGGammaValue* values = (CGGammaValue*) malloc(size * 3 * sizeof(CGGammaValue));
|
||||
CGGammaValue* values = (CGGammaValue*) calloc(size * 3, sizeof(CGGammaValue));
|
||||
|
||||
CGGetDisplayTransferByTable(monitor->ns.displayID,
|
||||
size,
|
||||
@@ -67,7 +67,7 @@ void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
|
||||
void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
|
||||
{
|
||||
int i;
|
||||
CGGammaValue* values = (CGGammaValue*) malloc(ramp->size * 3 * sizeof(CGGammaValue));
|
||||
CGGammaValue* values = (CGGammaValue*) calloc(ramp->size * 3, sizeof(CGGammaValue));
|
||||
|
||||
for (i = 0; i < ramp->size; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user