aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-11-07 00:06:26 +0000
committerChristian Grothoff <christian@grothoff.org>2015-11-07 00:06:26 +0000
commit3fd8c038f6b42cd13f20fa82ce2f130d258366c0 (patch)
treeb3e06f7bffac941da29a4f2539e92b764573a7e8 /src/transport/plugin_transport_http_common.c
parent49f07dd6fa3717c2035f616f973e4b67ac0b4f40 (diff)
downloadgnunet-3fd8c038f6b42cd13f20fa82ce2f130d258366c0.tar.gz
gnunet-3fd8c038f6b42cd13f20fa82ce2f130d258366c0.zip
-some code cleanup (indentation, redundant branches, etc.)
Diffstat (limited to 'src/transport/plugin_transport_http_common.c')
-rw-r--r--src/transport/plugin_transport_http_common.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c
index 13f01f713..9c0e93a37 100644
--- a/src/transport/plugin_transport_http_common.c
+++ b/src/transport/plugin_transport_http_common.c
@@ -567,7 +567,7 @@ http_common_plugin_address_to_url (void *cls,
567 GNUNET_break(0); 567 GNUNET_break(0);
568 return NULL; 568 return NULL;
569 } 569 }
570 if (0 >= addrlen) 570 if (0 == addrlen)
571 { 571 {
572 GNUNET_break(0); 572 GNUNET_break(0);
573 return NULL; 573 return NULL;
@@ -611,14 +611,14 @@ http_common_plugin_address_to_string (const char *plugin,
611 611
612 GNUNET_assert(NULL != plugin); 612 GNUNET_assert(NULL != plugin);
613 if (NULL == addr) 613 if (NULL == addr)
614 return NULL ; 614 return NULL;
615 if (0 == addrlen) 615 if (0 == addrlen)
616 return NULL ; 616 return NULL;
617 if (addrlen != http_common_address_get_size (address)) 617 if (addrlen != http_common_address_get_size (address))
618 return NULL ; 618 return NULL;
619 addr_str = (char *) &address[1]; 619 addr_str = (char *) &address[1];
620 if (addr_str[ntohl (address->urlen) - 1] != '\0') 620 if (addr_str[ntohl (address->urlen) - 1] != '\0')
621 return NULL ; 621 return NULL;
622 GNUNET_asprintf (&res, "%s.%u.%s", plugin, ntohl (address->options), 622 GNUNET_asprintf (&res, "%s.%u.%s", plugin, ntohl (address->options),
623 &address[1]); 623 &address[1]);
624 if (strlen (res) + 1 < 500) 624 if (strlen (res) + 1 < 500)
@@ -629,7 +629,7 @@ http_common_plugin_address_to_string (const char *plugin,
629 } 629 }
630 GNUNET_break(0); 630 GNUNET_break(0);
631 GNUNET_free(res); 631 GNUNET_free(res);
632 return NULL ; 632 return NULL;
633} 633}
634 634
635/** 635/**
@@ -772,7 +772,7 @@ http_common_socket_from_address (const void *addr,
772 GNUNET_break (0); 772 GNUNET_break (0);
773 return NULL; 773 return NULL;
774 } 774 }
775 if (0 >= addrlen) 775 if (0 == addrlen)
776 { 776 {
777 GNUNET_break (0); 777 GNUNET_break (0);
778 return NULL; 778 return NULL;
@@ -868,14 +868,14 @@ http_common_cmp_addresses (const void *addr1,
868 868
869 if (NULL == a1) 869 if (NULL == a1)
870 return GNUNET_SYSERR; 870 return GNUNET_SYSERR;
871 if (0 >= addrlen1) 871 if (0 == addrlen1)
872 return GNUNET_SYSERR; 872 return GNUNET_SYSERR;
873 if (a1[addrlen1 - 1] != '\0') 873 if (a1[addrlen1 - 1] != '\0')
874 return GNUNET_SYSERR; 874 return GNUNET_SYSERR;
875 875
876 if (NULL == a2) 876 if (NULL == a2)
877 return GNUNET_SYSERR; 877 return GNUNET_SYSERR;
878 if (0 >= addrlen2) 878 if (0 == addrlen2)
879 return GNUNET_SYSERR; 879 return GNUNET_SYSERR;
880 if (a2[addrlen2 - 1] != '\0') 880 if (a2[addrlen2 - 1] != '\0')
881 return GNUNET_SYSERR; 881 return GNUNET_SYSERR;