commit 6784ed2: [Minor] Replace in6_addr_t with struct in6_addr as defined by POSIX
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Jun 23 10:28:09 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-06-23 11:25:46 +0100
URL: https://github.com/rspamd/rspamd/commit/6784ed26d1a76c04ca27ec9badf4fbc32af29332 (HEAD -> master)
[Minor] Replace in6_addr_t with struct in6_addr as defined by POSIX
---
src/fuzzy_storage.c | 14 +++++++-------
src/libutil/addr.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 53e9f1efa..6242e47c7 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -1256,17 +1256,17 @@ rspamd_fuzzy_extensions_from_wire (struct fuzzy_session *s, guchar *buf, gsize b
p += sizeof (in_addr_t);
}
else if (cmd == RSPAMD_FUZZY_EXT_SOURCE_IP6) {
- if (end - p >= sizeof (in6_addr_t)) {
- p += sizeof (in6_addr_t);
+ if (end - p >= sizeof (struct in6_addr)) {
+ p += sizeof (struct in6_addr);
n_ext ++;
- st_len += sizeof (in6_addr_t);
+ st_len += sizeof (struct in6_addr);
}
else {
/* Truncation */
return FALSE;
}
- p += sizeof (in6_addr_t);
+ p += sizeof (struct in6_addr);
}
}
else {
@@ -1323,11 +1323,11 @@ rspamd_fuzzy_extensions_from_wire (struct fuzzy_session *s, guchar *buf, gsize b
ext->ext = RSPAMD_FUZZY_EXT_SOURCE_IP6;
ext->next = ext + 1;
- ext->length = sizeof (in6_addr_t);
+ ext->length = sizeof (struct in6_addr);
ext->payload = dest;
- memcpy (dest, p, sizeof (in6_addr_t));
+ memcpy (dest, p, sizeof (struct in6_addr));
p += sizeof (in_addr_t);
- data_buf += sizeof (in6_addr_t);
+ data_buf += sizeof (struct in6_addr);
ext = ext->next;
}
}
diff --git a/src/libutil/addr.h b/src/libutil/addr.h
index 483ad9434..010291008 100644
--- a/src/libutil/addr.h
+++ b/src/libutil/addr.h
@@ -86,7 +86,7 @@ rspamd_inet_addr_t *rspamd_inet_address_from_rnds (
/**
* Parse string with ipv6 address of length `len` to `target` which should be
- * at least sizeof (in6_addr_t)
+ * at least sizeof (struct in6_addr)
* @param text input string
* @param len length of `text` (if 0, then `text` must be zero terminated)
* @param target target structure
More information about the Commits
mailing list