summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ae16ad5)
raw | patch | inline | side by side (parent: ae16ad5)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 24 Jul 2016 11:56:32 +0000 (13:56 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 24 Jul 2016 11:57:40 +0000 (13:57 +0200) |
src/network.c | patch | blob | history |
diff --git a/src/network.c b/src/network.c
index d3c6044231edf2df1bf16e9df8f1c7f05509323d..cd5c0c1231b72f26885e7ee78b4203a14a663346 100644 (file)
--- a/src/network.c
+++ b/src/network.c
} /* }}} int network_get_aes256_cypher */
#endif /* HAVE_LIBGCRYPT */
-static int write_part_values (char **ret_buffer, int *ret_buffer_len,
+static int write_part_values (char **ret_buffer, size_t *ret_buffer_len,
const data_set_t *ds, const value_list_t *vl)
{
char *packet_ptr;
- int packet_len;
+ size_t packet_len;
int num_values;
part_header_t pkg_ph;
uint8_t *pkg_values_types;
value_t *pkg_values;
- int offset;
+ size_t offset;
int i;
num_values = vl->values_len;
return (0);
} /* int write_part_values */
-static int write_part_number (char **ret_buffer, int *ret_buffer_len,
+static int write_part_number (char **ret_buffer, size_t *ret_buffer_len,
int type, uint64_t value)
{
char *packet_ptr;
- int packet_len;
+ size_t packet_len;
part_header_t pkg_head;
uint64_t pkg_value;
- int offset;
+ size_t offset;
packet_len = sizeof (pkg_head) + sizeof (pkg_value);
return (0);
} /* int write_part_number */
-static int write_part_string (char **ret_buffer, int *ret_buffer_len,
- int type, const char *str, int str_len)
+static int write_part_string (char **ret_buffer, size_t *ret_buffer_len,
+ int type, const char *str, size_t str_len)
{
char *buffer;
- int buffer_len;
+ size_t buffer_len;
uint16_t pkg_type;
uint16_t pkg_length;
- int offset;
+ size_t offset;
buffer_len = 2 * sizeof (uint16_t) + str_len + 1;
if (*ret_buffer_len < buffer_len)
} /* for (sending_sockets) */
} /* }}} void network_send_buffer */
-static int add_to_buffer (char *buffer, int buffer_size, /* {{{ */
+static int add_to_buffer (char *buffer, size_t buffer_size, /* {{{ */
value_list_t *vl_def,
const data_set_t *ds, const value_list_t *vl)
{
static int network_notification (const notification_t *n,
user_data_t __attribute__((unused)) *user_data)
{
- char buffer[network_config_packet_size];
- char *buffer_ptr = buffer;
- int buffer_free = sizeof (buffer);
- int status;
+ char buffer[network_config_packet_size];
+ char *buffer_ptr = buffer;
+ size_t buffer_free = sizeof (buffer);
+ int status;
if (!check_send_notify_okay (n))
return (0);