[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 21/28: remove redundant condition in assertion
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 21/28: remove redundant condition in assertion |
Date: |
Fri, 10 Mar 2017 18:19:05 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 4480c9f12f363741cd956ae9a314ac18cbf79448
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Mar 10 18:04:01 2017 +0100
remove redundant condition in assertion
---
src/util/socks.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/util/socks.c b/src/util/socks.c
index 37e60e3e4..8c32eff4f 100644
--- a/src/util/socks.c
+++ b/src/util/socks.c
@@ -372,15 +372,18 @@ transmit_ready (void *cls,
return 0;
}
- GNUNET_assert (1024 >= size && size > 0);
- GNUNET_assert (SOCKS5_step_done > ih->step && ih->step >= 0);
+ GNUNET_assert ( (1024 >= size) && (size > 0) );
+ GNUNET_assert ( (SOCKS5_step_done > ih->step) && (ih->step >= 0) );
unsigned char * b = ih->outstep[ih->step];
unsigned char * e = ih->outstep[ih->step+1];
GNUNET_assert (e <= &ih->outbuf[1024]);
- unsigned l = e - b;
- GNUNET_assert (size >= l && l >= 0);
- GNUNET_memcpy(buf, b, l);
- register_reciever (ih, register_reciever_wants(ih));
+ unsigned int l = e - b;
+ GNUNET_assert (size >= l);
+ GNUNET_memcpy (buf,
+ b,
+ l);
+ register_reciever (ih,
+ register_reciever_wants (ih));
return l;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 20/28: fix out-of-bounds case in parser, (continued)
- [GNUnet-SVN] [gnunet] 20/28: fix out-of-bounds case in parser, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 15/28: add assertion to make static analysis happy, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 16/28: disambiguate enum type of value, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 09/28: fix memory leak, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 17/28: add assertion to make static analysis happy, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 12/28: fix ICMP IPv4/IPv6 type conversion logic, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 22/28: check return value from dup2, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 14/28: fix double-free, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 11/28: fix double-free, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 18/28: fix integer overflow test to actually work, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 21/28: remove redundant condition in assertion,
gnunet <=
- [GNUnet-SVN] [gnunet] 19/28: properly detect and handle parse error, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 13/28: prevent division by zero, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 23/28: check return value from GNUNET_program_run, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 24/28: fix comment, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 27/28: add assertion to make static analysis happy, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 25/28: use correct channel when switching, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 26/28: add assertion to make static analysis happy, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 28/28: add assertion to make static analysis happy, gnunet, 2017/03/10