diff --git a/newlib/libc/machine/nvptx/calloc.c b/newlib/libc/machine/nvptx/calloc.c index e83a32d49..f0ccf9018 100644 --- a/newlib/libc/machine/nvptx/calloc.c +++ b/newlib/libc/machine/nvptx/calloc.c @@ -22,5 +22,5 @@ calloc (size_t size, size_t len) void *p = malloc (size * len); if (!p) return p; - return memset (p, 0, len); + return memset (p, 0, size * len); }