diff options
Diffstat (limited to 'lib9p/9p.generated.c')
-rw-r--r-- | lib9p/9p.generated.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib9p/9p.generated.c b/lib9p/9p.generated.c index 4ec5ae5..fc243f5 100644 --- a/lib9p/9p.generated.c +++ b/lib9p/9p.generated.c @@ -400,8 +400,8 @@ static ALWAYS_INLINE bool validate_stat(struct _validate_ctx *ctx) { || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && validate_4(ctx) ) || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && validate_4(ctx) ) || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && validate_4(ctx) ) - || ((uint32_t)decode_u16le(&ctx->net_bytes[size_offset]) != ctx->net_offset - size_offset) - ? lib9p_error(ctx->ctx, LINUX_EBADMSG, "stat size does not match stat contents")" + || ((uint32_t)decode_u16le(&ctx->net_bytes[size_offset]) != ctx->net_offset - size_offset + ? lib9p_error(ctx->ctx, LINUX_EBADMSG, "stat size does not match stat contents") : false); } @@ -642,7 +642,7 @@ static ALWAYS_INLINE void unmarshal_qid(struct _unmarshal_ctx *ctx, struct lib9p static ALWAYS_INLINE void unmarshal_stat(struct _unmarshal_ctx *ctx, struct lib9p_stat *out) { memset(out, 0, sizeof(*out)); - size->net_offset += 2; + ctx->net_offset += 2; unmarshal_2(ctx, &out->kern_type); unmarshal_4(ctx, &out->kern_dev); unmarshal_qid(ctx, &out->file_qid); @@ -943,10 +943,10 @@ static ALWAYS_INLINE bool marshal_qid(struct _marshal_ctx *ctx, struct lib9p_qid static ALWAYS_INLINE bool marshal_stat(struct _marshal_ctx *ctx, struct lib9p_stat *val) { uint32_t size_offset = ctx->net_offset; - return ((ctx->net_offset + 2 > ctx->ctx->max_msg_size) + return (ctx->net_offset + 2 > ctx->ctx->max_msg_size ? _marshal_too_large(ctx) : ({ ctx->net_offset += 2; false; })) - return marshal_2(ctx, &val->kern_type) + || marshal_2(ctx, &val->kern_type) || marshal_4(ctx, &val->kern_dev) || marshal_qid(ctx, &val->file_qid) || marshal_dm(ctx, &val->file_mode) |