avoid a malloc(0)
This is unlikely to fix any problems, but I think malloc(0) is not specified by C99.
This commit is contained in:
parent
791ec4cfb1
commit
bc018585ac
|
@ -3929,7 +3929,7 @@ static Scheme_Object *foreign_ffi_callback(int argc, Scheme_Object *argv[])
|
||||||
`free_cl_cif_queue_args' to clean up this extra level. */
|
`free_cl_cif_queue_args' to clean up this extra level. */
|
||||||
GC_CAN_IGNORE void **tmp, *cr;
|
GC_CAN_IGNORE void **tmp, *cr;
|
||||||
if (constant_reply) {
|
if (constant_reply) {
|
||||||
cr = malloc(constant_reply_size);
|
cr = malloc(constant_reply_size ? constant_reply_size : 1);
|
||||||
memcpy(cr, constant_reply, constant_reply_size);
|
memcpy(cr, constant_reply, constant_reply_size);
|
||||||
constant_reply = cr;
|
constant_reply = cr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3127,7 +3127,7 @@ static void free_cl_cif_queue_args(void *ignored, void *p)
|
||||||
`free_cl_cif_queue_args' to clean up this extra level. */
|
`free_cl_cif_queue_args' to clean up this extra level. */
|
||||||
GC_CAN_IGNORE void **tmp, *cr;
|
GC_CAN_IGNORE void **tmp, *cr;
|
||||||
if (constant_reply) {
|
if (constant_reply) {
|
||||||
cr = malloc(constant_reply_size);
|
cr = malloc(constant_reply_size ? constant_reply_size : 1);
|
||||||
memcpy(cr, constant_reply, constant_reply_size);
|
memcpy(cr, constant_reply, constant_reply_size);
|
||||||
constant_reply = cr;
|
constant_reply = cr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user