summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2016-01-15 11:07:41 -0700
committerMartin Sebor <msebor@redhat.com>2016-01-15 11:07:41 -0700
commitf2b3078e6a20211233d4971653838e06d048296a (patch)
treec8f87652683c3788442b44a25e83bf82d22857c8 /stdlib
parentad37480c4b79b801b987f5529d036b4e25cac615 (diff)
Fix build failures with -DDEBUG.
[BZ #19443] * crypt/crypt_util.c [DEBUG] (_ufc_prbits): Correct format string. [DEBUG] (_ufc_set_bits): Declare used. * iconv/gconv_dl.c [DEBUG]: Add a missing include directive. [DEBUG] (print_all): Declare used. * resolv/res_send.c [DEBUG] (__libc_res_nsend): Explicitly convert operands of the ternary ?: expression to target type. * stdlib/rshift.c [DEBUG] (mpn_rshift): Use assert() instead of calling the undeclared abort. * time/mktime.c [DEBUG] (DEBUG): Rename to DEBUG_MKTIME.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/rshift.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/stdlib/rshift.c b/stdlib/rshift.c
index 4cf345c97e..d76b9c8c02 100644
--- a/stdlib/rshift.c
+++ b/stdlib/rshift.c
@@ -21,6 +21,8 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
#include <gmp.h>
#include "gmp-impl.h"
+#include <assert.h>
+
/* Shift U (pointed to by UP and USIZE limbs long) CNT bits to the right
and store the USIZE least significant limbs of the result at WP.
The bits shifted out to the right are returned.
@@ -40,10 +42,7 @@ mpn_rshift (register mp_ptr wp,
register mp_size_t i;
mp_limb_t retval;
-#ifdef DEBUG
- if (usize == 0 || cnt == 0)
- abort ();
-#endif
+ assert (usize != 0 && cnt != 0);
sh_1 = cnt;