aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/module/lua/lstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/module/lua/lstring.c')
-rw-r--r--sys/contrib/openzfs/module/lua/lstring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/contrib/openzfs/module/lua/lstring.c b/sys/contrib/openzfs/module/lua/lstring.c
index 15a73116bb77..149a4ffc5023 100644
--- a/sys/contrib/openzfs/module/lua/lstring.c
+++ b/sys/contrib/openzfs/module/lua/lstring.c
@@ -103,7 +103,7 @@ static TString *createstrobj (lua_State *L, const char *str, size_t l,
ts->tsv.len = l;
ts->tsv.hash = h;
ts->tsv.extra = 0;
- sbuf = (char *)(TString *)(ts + 1);
+ sbuf = ts->contents;
memcpy(sbuf, str, l*sizeof(char));
sbuf[l] = '\0'; /* ending 0 */
return ts;