Skip to content

Commit

Permalink
Remove unnecessary ssize_t posix-ism
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bnoordhuis committed Feb 16, 2024
1 parent c06af87 commit 3bb2ca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3bb2ca3

Please sign in to comment.