aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/machine/nvptx/calloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/machine/nvptx/calloc.c b/newlib/libc/machine/nvptx/calloc.c
index e83a32d..f0ccf90 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);
}