diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-26 02:57:12 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-26 02:57:12 -0600 |
commit | 1dad21650eb6fb3a4b9bba6c0ddd1402930163e2 (patch) | |
tree | 0779682be9a5f22d8e7c33824319d291105fa2c8 /lib9p | |
parent | 20ff819fc032fb6ae902022f12891ae7c9f73151 (diff) |
Lint for tabs-as-alignment
Diffstat (limited to 'lib9p')
-rwxr-xr-x | lib9p/idl.gen | 2 | ||||
-rw-r--r-- | lib9p/include/lib9p/9p.generated.h | 2 | ||||
-rw-r--r-- | lib9p/include/lib9p/9p.h | 4 | ||||
-rw-r--r-- | lib9p/internal.h | 24 | ||||
-rw-r--r-- | lib9p/map.h | 8 | ||||
-rw-r--r-- | lib9p/srv.c | 2 |
6 files changed, 21 insertions, 21 deletions
diff --git a/lib9p/idl.gen b/lib9p/idl.gen index a353a86..8a168b7 100755 --- a/lib9p/idl.gen +++ b/lib9p/idl.gen @@ -538,7 +538,7 @@ def gen_h(versions: set[str], typs: list[Type]) -> str: ret = f"""/* Generated by `{' '.join(sys.argv)}`. DO NOT EDIT! */ #ifndef _LIB9P_9P_H_ -# error Do not include <lib9p/9p.generated.h> directly; include <lib9p/9p.h> instead + #error Do not include <lib9p/9p.generated.h> directly; include <lib9p/9p.h> instead #endif #include <stdint.h> /* for uint{{n}}_t types */ diff --git a/lib9p/include/lib9p/9p.generated.h b/lib9p/include/lib9p/9p.generated.h index ca7ca07..d5e94d1 100644 --- a/lib9p/include/lib9p/9p.generated.h +++ b/lib9p/include/lib9p/9p.generated.h @@ -1,7 +1,7 @@ /* Generated by `./lib9p/idl.gen lib9p/idl/2002-9P2000.9p lib9p/idl/2005-9P2000.u.9p lib9p/idl/2012-9P2000.e.9p`. DO NOT EDIT! */ #ifndef _LIB9P_9P_H_ -# error Do not include <lib9p/9p.generated.h> directly; include <lib9p/9p.h> instead + #error Do not include <lib9p/9p.generated.h> directly; include <lib9p/9p.h> instead #endif #include <stdint.h> /* for uint{n}_t types */ diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h index a99cd5d..231556a 100644 --- a/lib9p/include/lib9p/9p.h +++ b/lib9p/include/lib9p/9p.h @@ -18,10 +18,10 @@ #include "config.h" #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 #ifndef CONFIG_9P_ENABLE_9P2000 -# define CONFIG_9P_ENABLE_9P2000 + #define CONFIG_9P_ENABLE_9P2000 #endif /******************************************************************************/ 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) diff --git a/lib9p/map.h b/lib9p/map.h index a13edb5..458fe74 100644 --- a/lib9p/map.h +++ b/lib9p/map.h @@ -12,16 +12,16 @@ */ #ifndef NAME -# error NAME must be defined + #error NAME must be defined #endif #ifndef KEY_T -# error KEY_T must be defined + #error KEY_T must be defined #endif #ifndef VAL_T -# error VAL_T must be defined + #error VAL_T must be defined #endif #ifndef CAP -# error CAP must be defined + #error CAP must be defined #endif #ifndef MAP_KEY diff --git a/lib9p/srv.c b/lib9p/srv.c index 8eef372..83a6555 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -57,7 +57,7 @@ struct _srv_fidinfo { struct _srv_conn { /* immutable */ struct lib9p_srv *parent_srv; - implements_net_stream_conn *fd; + implements_net_stream_conn *fd; cid_t reader; /* the lib9p_srv_read_cr() coroutine */ /* mutable */ cr_mutex_t writelock; |