summaryrefslogtreecommitdiff
path: root/py/formatfloat.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-12-28 14:14:06 +1100
committerDamien George <damien.p.george@gmail.com>2017-12-29 14:17:55 +1100
commite78427443094163d1839387a2470fd22612ca8d1 (patch)
tree6acf62bf71c54169aa296eebf36f968bc434fbec /py/formatfloat.c
parent9766fddcdc29cb2b5a8657389b870703580a6e57 (diff)
py/mpz: In mpz_as_str_inpl, convert always-false checks to assertions.
There are two checks that are always false so can be converted to (negated) assertions to save code space and execution time. They are: 1. The check of the str parameter, which is required to be non-NULL as per the original comment that it has enough space in it as calculated by mp_int_format_size. And for all uses of this function str is indeed non-NULL. 2. The check of the base parameter, which is already required to be between 2 and 16 (inclusive) via the assertion in mp_int_format_size.
Diffstat (limited to 'py/formatfloat.c')
0 files changed, 0 insertions, 0 deletions