From f17c709c6e35a0bea471a4e8ae7d2183b4a1f32d Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Mon, 24 Mar 2025 02:17:21 -0600 Subject: lib9p: protogen: marshal, unmarshal: collapse identitical if's --- lib9p/9p.generated.c | 72 ---------------------------------------------------- 1 file changed, 72 deletions(-) (limited to 'lib9p/9p.generated.c') diff --git a/lib9p/9p.generated.c b/lib9p/9p.generated.c index 36e1e14..500d71b 100644 --- a/lib9p/9p.generated.c +++ b/lib9p/9p.generated.c @@ -2052,20 +2052,8 @@ static void unmarshal_stat(struct _unmarshal_ctx *ctx, struct lib9p_stat *out) { if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U16LE(ctx, out->file_extension.len); UNMARSHAL_BYTES(ctx, out->file_extension.utf8, out->file_extension.len); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U32LE(ctx, out->file_owner_n_uid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U32LE(ctx, out->file_owner_n_gid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U32LE(ctx, out->file_last_modified_n_uid); } #endif /* CONFIG_9P_ENABLE_9P2000_u */ @@ -2336,20 +2324,8 @@ static void unmarshal_Rstat(struct _unmarshal_ctx *ctx, struct lib9p_msg_Rstat * if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U16LE(ctx, out->stat.file_extension.len); UNMARSHAL_BYTES(ctx, out->stat.file_extension.utf8, out->stat.file_extension.len); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U32LE(ctx, out->stat.file_owner_n_uid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U32LE(ctx, out->stat.file_owner_n_gid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U32LE(ctx, out->stat.file_last_modified_n_uid); } #endif /* CONFIG_9P_ENABLE_9P2000_u */ @@ -2383,20 +2359,8 @@ static void unmarshal_Twstat(struct _unmarshal_ctx *ctx, struct lib9p_msg_Twstat if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U16LE(ctx, out->stat.file_extension.len); UNMARSHAL_BYTES(ctx, out->stat.file_extension.utf8, out->stat.file_extension.len); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U32LE(ctx, out->stat.file_owner_n_uid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U32LE(ctx, out->stat.file_owner_n_gid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { UNMARSHAL_U32LE(ctx, out->stat.file_last_modified_n_uid); } #endif /* CONFIG_9P_ENABLE_9P2000_u */ @@ -2948,20 +2912,8 @@ static bool marshal_stat(struct _marshal_ctx *ctx, struct lib9p_stat *val) { if (is_ver(ctx, 9P2000_u)) { MARSHAL_U16LE(ctx, val->file_extension.len); MARSHAL_BYTES(ctx, val->file_extension.utf8, val->file_extension.len); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { MARSHAL_U32LE(ctx, val->file_owner_n_uid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { MARSHAL_U32LE(ctx, val->file_owner_n_gid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { MARSHAL_U32LE(ctx, val->file_last_modified_n_uid); } #endif /* CONFIG_9P_ENABLE_9P2000_u */ @@ -3534,20 +3486,8 @@ static bool marshal_Rstat(struct _marshal_ctx *ctx, struct lib9p_msg_Rstat *val) if (is_ver(ctx, 9P2000_u)) { MARSHAL_U16LE(ctx, val->stat.file_extension.len); MARSHAL_BYTES_ZEROCOPY(ctx, val->stat.file_extension.utf8, val->stat.file_extension.len); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { MARSHAL_U32LE(ctx, val->stat.file_owner_n_uid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { MARSHAL_U32LE(ctx, val->stat.file_owner_n_gid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { MARSHAL_U32LE(ctx, val->stat.file_last_modified_n_uid); } #endif /* CONFIG_9P_ENABLE_9P2000_u */ @@ -3605,20 +3545,8 @@ static bool marshal_Twstat(struct _marshal_ctx *ctx, struct lib9p_msg_Twstat *va if (is_ver(ctx, 9P2000_u)) { MARSHAL_U16LE(ctx, val->stat.file_extension.len); MARSHAL_BYTES_ZEROCOPY(ctx, val->stat.file_extension.utf8, val->stat.file_extension.len); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { MARSHAL_U32LE(ctx, val->stat.file_owner_n_uid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { MARSHAL_U32LE(ctx, val->stat.file_owner_n_gid); - } -#endif /* CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u - if (is_ver(ctx, 9P2000_u)) { MARSHAL_U32LE(ctx, val->stat.file_last_modified_n_uid); } #endif /* CONFIG_9P_ENABLE_9P2000_u */ -- cgit v1.2.3-2-g168b