diff options
Diffstat (limited to 'lib9p/9p.generated.c')
-rw-r--r-- | lib9p/9p.generated.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib9p/9p.generated.c b/lib9p/9p.generated.c index 54e7613..1fef571 100644 --- a/lib9p/9p.generated.c +++ b/lib9p/9p.generated.c @@ -611,7 +611,7 @@ static ALWAYS_INLINE void unmarshal_8(struct _unmarshal_ctx *ctx, uint64_t *out) static ALWAYS_INLINE void unmarshal_d(struct _unmarshal_ctx *ctx, struct lib9p_d *out) { memset(out, 0, sizeof(*out)); unmarshal_4(ctx, &out->len); - out->dat = ctx->extra; + out->dat = ctx->extra; ctx->extra += sizeof(out->dat[0]) * out->len; for (typeof(out->len) i = 0; i < out->len; i++) unmarshal_1(ctx, (uint8_t *)&out->dat[i]); @@ -620,10 +620,12 @@ static ALWAYS_INLINE void unmarshal_d(struct _unmarshal_ctx *ctx, struct lib9p_d static ALWAYS_INLINE void unmarshal_s(struct _unmarshal_ctx *ctx, struct lib9p_s *out) { memset(out, 0, sizeof(*out)); unmarshal_2(ctx, &out->len); - out->utf8 = ctx->extra; + out->utf8 = ctx->extra; ctx->extra += sizeof(out->utf8[0]) * out->len; for (typeof(out->len) i = 0; i < out->len; i++) unmarshal_1(ctx, (uint8_t *)&out->utf8[i]); + ctx->extra++; + out->utf8[out->len] = '\0'; } static ALWAYS_INLINE void unmarshal_dm(struct _unmarshal_ctx *ctx, lib9p_dm_t *out) { @@ -724,7 +726,7 @@ static FLATTEN void unmarshal_Twalk(struct _unmarshal_ctx *ctx, struct lib9p_msg unmarshal_4(ctx, &out->fid); unmarshal_4(ctx, &out->newfid); unmarshal_2(ctx, &out->nwname); - out->wname = ctx->extra; + out->wname = ctx->extra; ctx->extra += sizeof(out->wname[0]) * out->nwname; for (typeof(out->nwname) i = 0; i < out->nwname; i++) unmarshal_s(ctx, &out->wname[i]); @@ -733,7 +735,7 @@ static FLATTEN void unmarshal_Twalk(struct _unmarshal_ctx *ctx, struct lib9p_msg static FLATTEN void unmarshal_Rwalk(struct _unmarshal_ctx *ctx, struct lib9p_msg_Rwalk *out) { memset(out, 0, sizeof(*out)); unmarshal_2(ctx, &out->nwqid); - out->wqid = ctx->extra; + out->wqid = ctx->extra; ctx->extra += sizeof(out->wqid[0]) * out->nwqid; for (typeof(out->nwqid) i = 0; i < out->nwqid; i++) unmarshal_qid(ctx, &out->wqid[i]); @@ -840,7 +842,7 @@ static FLATTEN void unmarshal_Tsread(struct _unmarshal_ctx *ctx, struct lib9p_ms memset(out, 0, sizeof(*out)); unmarshal_4(ctx, &out->fid); unmarshal_2(ctx, &out->nwname); - out->wname = ctx->extra; + out->wname = ctx->extra; ctx->extra += sizeof(out->wname[0]) * out->nwname; for (typeof(out->nwname) i = 0; i < out->nwname; i++) unmarshal_s(ctx, &out->wname[i]); @@ -855,7 +857,7 @@ static FLATTEN void unmarshal_Tswrite(struct _unmarshal_ctx *ctx, struct lib9p_m memset(out, 0, sizeof(*out)); unmarshal_4(ctx, &out->fid); unmarshal_2(ctx, &out->nwname); - out->wname = ctx->extra; + out->wname = ctx->extra; ctx->extra += sizeof(out->wname[0]) * out->nwname; for (typeof(out->nwname) i = 0; i < out->nwname; i++) unmarshal_s(ctx, &out->wname[i]); |