summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-01-09 08:22:29 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-01-09 08:22:29 +0100
commite5826e3c5a317f24c1c1e5b48cc6200e3f81edf2 (patch)
tree63bc60329db27bc1ac7c264b25f302e5a2b5b604
parente9baf5d6cf5559b0327eaef667158e5adf56cf7e (diff)
downloadfastd-e5826e3c5a317f24c1c1e5b48cc6200e3f81edf2.tar
fastd-e5826e3c5a317f24c1c1e5b48cc6200e3f81edf2.zip
More comment fixes
-rw-r--r--src/handshake.c2
-rw-r--r--src/handshake.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/handshake.c b/src/handshake.c
index 7dd5b44..9b2c955 100644
--- a/src/handshake.c
+++ b/src/handshake.c
@@ -77,7 +77,7 @@ static inline uint32_t as_uint32(const fastd_handshake_record_t *record) {
return as_uint24(record) << 8 | record->data[3];
}
-/** Reads a TLV record as a 16bit integer (little endian) */
+/** Reads a TLV record as a 16bit integer (little or big endian) */
static inline uint16_t as_uint16_endian(const fastd_handshake_record_t *record, bool little_endian) {
if (little_endian)
return as_uint8(record) | (uint16_t)record->data[1] << 8;
diff --git a/src/handshake.h b/src/handshake.h
index f5582e9..a704782 100644
--- a/src/handshake.h
+++ b/src/handshake.h
@@ -194,7 +194,7 @@ static inline void fastd_handshake_add_uint32(fastd_handshake_buffer_t *buffer,
dst[3] = value;
}
-/** Adds an uint16 TLV record of given type and value to a handshake buffer encoded as little endian */
+/** Adds an uint16 TLV record of given type and value to a handshake buffer (potentially encoded as little endian) */
static inline void fastd_handshake_add_uint16_endian(fastd_handshake_buffer_t *buffer, fastd_handshake_record_type_t type, uint16_t value) {
uint8_t *dst = fastd_handshake_extend(buffer, type, 2);