summaryrefslogtreecommitdiff
path: root/lib9p/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/internal.h')
-rw-r--r--lib9p/internal.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib9p/internal.h b/lib9p/internal.h
index d78823d..c300be3 100644
--- a/lib9p/internal.h
+++ b/lib9p/internal.h
@@ -17,19 +17,19 @@
#include "config.h"
#ifndef CONFIG_9P_MAX_MSG_SIZE
-# error config.h must define CONFIG_9P_MAX_MSG_SIZE
+ #error config.h must define CONFIG_9P_MAX_MSG_SIZE
#endif
#ifndef CONFIG_9P_MAX_HOSTMSG_SIZE
-# error config.h must define CONFIG_9P_MAX_HOSTMSG_SIZE
+ #error config.h must define CONFIG_9P_MAX_HOSTMSG_SIZE
#endif
#ifndef CONFIG_9P_MAX_FIDS
-# error config.h must define CONFIG_9P_MAX_FIDS
+ #error config.h must define CONFIG_9P_MAX_FIDS
#endif
#ifndef CONFIG_9P_MAX_REQS
-# error config.h must define CONFIG_9P_MAX_REQS
+ #error config.h must define CONFIG_9P_MAX_REQS
#endif
#ifndef CONFIG_9P_MAX_ERR_SIZE
-# error config.h must define CONFIG_9P_MAX_ERR_SIZE
+ #error config.h must define CONFIG_9P_MAX_ERR_SIZE
#endif
static_assert(CONFIG_9P_MAX_ERR_SIZE <= UINT16_MAX);
@@ -55,7 +55,7 @@ struct _validate_ctx {
uint32_t net_offset;
/* Increment `host_extra` to pre-allocate space that is
* "extra" beyond sizeof(). */
- size_t host_extra;
+ size_t host_extra;
};
typedef bool (*_validate_fn_t)(struct _validate_ctx *ctx);
@@ -103,20 +103,20 @@ static ALWAYS_INLINE uint8_t decode_u8le(uint8_t *in) {
return in[0];
}
static ALWAYS_INLINE uint16_t decode_u16le(uint8_t *in) {
- return (((uint16_t)(in[0])) << 0)
- | (((uint16_t)(in[1])) << 8)
+ return (((uint16_t)(in[0])) << 0)
+ | (((uint16_t)(in[1])) << 8)
;
}
static ALWAYS_INLINE uint32_t decode_u32le(uint8_t *in) {
- return (((uint32_t)(in[0])) << 0)
- | (((uint32_t)(in[1])) << 8)
+ return (((uint32_t)(in[0])) << 0)
+ | (((uint32_t)(in[1])) << 8)
| (((uint32_t)(in[2])) << 16)
| (((uint32_t)(in[3])) << 24)
;
}
static ALWAYS_INLINE uint64_t decode_u64le(uint8_t *in) {
- return (((uint64_t)(in[0])) << 0)
- | (((uint64_t)(in[1])) << 8)
+ return (((uint64_t)(in[0])) << 0)
+ | (((uint64_t)(in[1])) << 8)
| (((uint64_t)(in[2])) << 16)
| (((uint64_t)(in[3])) << 24)
| (((uint64_t)(in[4])) << 32)