[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: fix type
From: |
gnunet |
Subject: |
[gnunet] branch master updated: fix type |
Date: |
Mon, 03 Aug 2020 16:40:06 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new a899a94dc fix type
a899a94dc is described below
commit a899a94dccabeae11ccef5565751a9ace2f6cd01
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Aug 3 16:33:54 2020 +0200
fix type
---
contrib/build-common | 2 +-
src/include/gnunet_buffer_lib.h | 6 +++---
src/util/buffer.c | 21 +++++++++++----------
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/contrib/build-common b/contrib/build-common
index d1f949d0c..1915a74bb 160000
--- a/contrib/build-common
+++ b/contrib/build-common
@@ -1 +1 @@
-Subproject commit d1f949d0cbe30839eb53f34e2a8b34f61e0ad33a
+Subproject commit 1915a74bbb4cd2ae9bc541a382dfebc37064a2fd
diff --git a/src/include/gnunet_buffer_lib.h b/src/include/gnunet_buffer_lib.h
index 046aee72b..0c566df75 100644
--- a/src/include/gnunet_buffer_lib.h
+++ b/src/include/gnunet_buffer_lib.h
@@ -116,12 +116,12 @@ GNUNET_buffer_write_str (struct GNUNET_Buffer *buf, const
char *str);
*
* @param buf buffer to write to
* @param data data to read from
- * @param len number of bytes to copy from @a data to @a buf
+ * @param data_len number of bytes to copy from @a data to @a buf
*/
void
GNUNET_buffer_write_data_encoded (struct GNUNET_Buffer *buf,
- const char *data,
- size_t len);
+ const void *data,
+ size_t data_len);
/**
diff --git a/src/util/buffer.c b/src/util/buffer.c
index 8fb10c2a5..662e4d0f2 100644
--- a/src/util/buffer.c
+++ b/src/util/buffer.c
@@ -32,7 +32,8 @@
* @param capacity the capacity (in bytes) to allocate for @a buf
*/
void
-GNUNET_buffer_prealloc (struct GNUNET_Buffer *buf, size_t capacity)
+GNUNET_buffer_prealloc (struct GNUNET_Buffer *buf,
+ size_t capacity)
{
/* Buffer should be zero-initialized */
GNUNET_assert (0 == buf->mem);
@@ -257,25 +258,25 @@ GNUNET_buffer_write_vfstr (struct GNUNET_Buffer *buf,
*
* @param buf buffer to write to
* @param data data to read from
- * @param len number of bytes to copy from @a data to @a buf
+ * @param data_len number of bytes to copy from @a data to @a buf
*/
void
GNUNET_buffer_write_data_encoded (struct GNUNET_Buffer *buf,
- const char *data,
- size_t len)
+ const void *data,
+ size_t data_len)
{
- size_t outlen = len * 8;
+ size_t outlen = data_len * 8;
if (outlen % 5 > 0)
outlen += 5 - outlen % 5;
outlen /= 5;
-
- GNUNET_buffer_ensure_remaining (buf, outlen);
+ GNUNET_buffer_ensure_remaining (buf,
+ outlen);
GNUNET_assert (NULL !=
GNUNET_STRINGS_data_to_string (data,
- len,
- (buf->mem +
- buf->position),
+ data_len,
+ (buf->mem
+ + buf->position),
outlen));
buf->position += outlen;
GNUNET_assert (buf->position <= buf->capacity);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: fix type,
gnunet <=