gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 08/09: Uncrustify


From: gnunet
Subject: [gnunet] 08/09: Uncrustify
Date: Thu, 07 Dec 2023 15:51:17 +0100

This is an automated email from the git hooks/post-receive script.

sebi pushed a commit to branch master
in repository gnunet.

commit a9822f4d2388efec57029131d8f2915e867fd59d
Author: Sebastian Nadler <sebastian.nadler@tum.de>
AuthorDate: Mon Dec 4 15:40:09 2023 +0100

    Uncrustify
---
 src/lib/util/dnsparser.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/lib/util/dnsparser.c b/src/lib/util/dnsparser.c
index d0bae7400..1f51eacdc 100644
--- a/src/lib/util/dnsparser.c
+++ b/src/lib/util/dnsparser.c
@@ -552,9 +552,11 @@ GNUNET_DNSPARSER_parse_uri (const char *udp_payload,
   uri = GNUNET_new (struct GNUNET_DNSPARSER_UriRecord);
   uri->priority = ntohs (uri_bin.prio);
   uri->weight = ntohs (uri_bin.weight);
-  int len =  GNUNET_asprintf(&(uri->target), "%.*s", udp_payload_length - 
sizeof(struct GNUNET_TUN_DnsUriRecord), &udp_payload[*off]);
+  int len =  GNUNET_asprintf (&(uri->target), "%.*s", udp_payload_length
+                              - sizeof(struct GNUNET_TUN_DnsUriRecord),
+                              &udp_payload[*off]);
   (*off) += len;
-  if (NULL == uri->target) // || GNUNET_STRINGS_parse_uri(uri->target, NULL, 
NULL) == GNUNET_NO)
+  if (NULL == uri->target)
   {
     GNUNET_DNSPARSER_free_uri (uri);
     *off = old_off;
@@ -1258,8 +1260,10 @@ GNUNET_DNSPARSER_builder_add_uri (char *dst,
   sd.weight = htons (uri->weight);
   GNUNET_memcpy (&dst[*off], &sd, sizeof(sd));
   (*off) += sizeof(sd);
-  strncpy(&dst[*off], uri->target, dst_len - sizeof(struct 
GNUNET_TUN_DnsUriRecord) - 1);
-  (*off) += strlen(uri->target);
+  strncpy (&dst[*off], uri->target, dst_len - sizeof(struct
+                                                     GNUNET_TUN_DnsUriRecord)
+           - 1);
+  (*off) += strlen (uri->target);
   dst[*off] = '\0';
   return GNUNET_OK;
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]