From 3bb2ca360e994c93e9bf273a685c061d5e0b58f4 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 16 Feb 2024 10:25:29 +0100 Subject: [PATCH] Remove unnecessary ssize_t posix-ism ssize_t is not always available and the cast it was used in wasn't necessary in the first place, the value already has the right type. Note that the field malloc_limit is an int64_t in JSMemoryUsage whereas it is a size_t in JSMallocState. --- quickjs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickjs.c b/quickjs.c index fccf340..c3db038 100644 --- a/quickjs.c +++ b/quickjs.c @@ -6242,7 +6242,7 @@ void JS_DumpMemoryUsage(FILE *fp, const JSMemoryUsage *s, JSRuntime *rt) "BigNum " #endif CONFIG_VERSION " version, %d-bit, malloc limit: %"PRId64"\n\n", - (int)sizeof(void *) * 8, (int64_t)(ssize_t)s->malloc_limit); + (int)sizeof(void *) * 8, s->malloc_limit); #if 1 if (rt) { static const struct {