mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Use calloc in swap_HALF_in_ZVALUE() to help with compiler paranoia
This commit is contained in:
@@ -575,7 +575,7 @@ swap_HALF_in_ZVALUE(ZVALUE *dest, ZVALUE *src, BOOL all)
|
|||||||
/*
|
/*
|
||||||
* allocate the storage
|
* allocate the storage
|
||||||
*/
|
*/
|
||||||
dest = malloc(sizeof(ZVALUE));
|
dest = calloc(1, sizeof(ZVALUE));
|
||||||
if (dest == NULL) {
|
if (dest == NULL) {
|
||||||
math_error("swap_HALF_in_ZVALUE: Not enough memory");
|
math_error("swap_HALF_in_ZVALUE: Not enough memory");
|
||||||
not_reached();
|
not_reached();
|
||||||
|
Reference in New Issue
Block a user