[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 16/28: disambiguate enum type of value
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 16/28: disambiguate enum type of value |
Date: |
Fri, 10 Mar 2017 18:19:00 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 07c15041f3a502e22d1c239bca77c85c6b2bb39c
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Mar 10 17:53:50 2017 +0100
disambiguate enum type of value
---
src/nat/nat_stun.h | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/nat/nat_stun.h b/src/nat/nat_stun.h
index 3e4228875..8d1c2720f 100644
--- a/src/nat/nat_stun.h
+++ b/src/nat/nat_stun.h
@@ -70,7 +70,7 @@ struct stun_addr
* Port number.
*/
uint16_t port;
-
+
/**
* IPv4 address. Should this be "struct in_addr"?
*/
@@ -79,7 +79,7 @@ struct stun_addr
/**
- * STUN message classes
+ * STUN message classes
*/
enum StunClasses {
INVALID_CLASS = 0,
@@ -186,18 +186,19 @@ stun_msg2str (int msg)
static char result[64];
const char *msg_class = NULL;
const char *method = NULL;
- int value;
+ enum StunClasses cvalue;
+ enum StunMethods mvalue;
- value = decode_class (msg);
+ cvalue = decode_class (msg);
for (unsigned int i = 0; classes[i].name; i++)
- if (classes[i].value == value)
+ if (classes[i].value == cvalue)
{
msg_class = classes[i].name;
break;
}
- value = decode_method (msg);
+ mvalue = decode_method (msg);
for (unsigned int i = 0; methods[i].name; i++)
- if (methods[i].value == value)
+ if (methods[i].value == mvalue)
{
method = methods[i].name;
break;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 08/28: fix memory leak, (continued)
- [GNUnet-SVN] [gnunet] 08/28: fix memory leak, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 03/28: make sure 'err' is initialized on all error paths, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 06/28: properly handle error on empty queue, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 04/28: handle case 'diff' is NULL - fixes NPE, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 02/28: make compiler happy, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 05/28: fix comment, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 07/28: fix memory leak, gnunet, 2017/03/10
- [GNUnet-SVN] [gnunet] 10/28: fix memory leak, gnunet, 2017/03/10
- [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 <=
- [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, 2017/03/10
- [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