diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2012-05-26 15:57:43 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2012-05-26 15:57:43 +0200 |
commit | eb3632bb2177f6ea7d2f41c9722458c10159c013 (patch) | |
tree | 624a47bf95ce22460938a693f797937f5d6003cb /mpz/lucnum_ui.c | |
parent | 27ac5bf5c349d49c7103674b4a366afb6ad51cca (diff) | |
download | gmp-eb3632bb2177f6ea7d2f41c9722458c10159c013.tar.gz |
Use MPZ_REALLOC return value when possible.
Diffstat (limited to 'mpz/lucnum_ui.c')
-rw-r--r-- | mpz/lucnum_ui.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mpz/lucnum_ui.c b/mpz/lucnum_ui.c index ae566770e..cf0b7c5c6 100644 --- a/mpz/lucnum_ui.c +++ b/mpz/lucnum_ui.c @@ -1,6 +1,6 @@ /* mpz_lucnum_ui -- calculate Lucas number. -Copyright 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +Copyright 2001, 2003, 2005, 2011, 2012 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -66,8 +66,7 @@ mpz_lucnum_ui (mpz_ptr ln, unsigned long n) since square or mul used below might need an extra limb over the true size */ lalloc = MPN_FIB2_SIZE (n) + 2; - MPZ_REALLOC (ln, lalloc); - lp = PTR (ln); + lp = MPZ_REALLOC (ln, lalloc); TMP_MARK; xalloc = lalloc; |