Skip to content

Commit

Permalink
Use #if not def _WIN32
Browse files Browse the repository at this point in the history
  • Loading branch information
satk0 committed Oct 6, 2024
1 parent e30ab3e commit 0ca98f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libbf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1711,9 +1711,11 @@ static int __bf_div(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec,

na = n + nb;

if (sizeof(limb_t) > sizeof(uint64_t) && na >= (SIZE_MAX / sizeof(limb_t)) - 1) {
#if !defined(_WIN32)
if (na >= (SIZE_MAX / sizeof(limb_t)) - 1) {
return BF_ST_MEM_ERROR; /* Return memory error status */
}
#endif

taba = bf_malloc(s, (na + 1) * sizeof(limb_t));
if (!taba)
Expand Down

0 comments on commit 0ca98f0

Please sign in to comment.