X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=cdb%2Fwriteable.c;h=3ad0c1e5499ab01cc994e7d54dbf352299823595;hp=6b072ffdba7042398965758dc6ad386b18c15a5b;hb=1bb5d87c00dff7d3134ec9c7f0272ca0dd34b662;hpb=7c5f211f728a6eabe07ff16476c2c5273f3ccca9 diff --git a/cdb/writeable.c b/cdb/writeable.c index 6b072ff..3ad0c1e 100644 --- a/cdb/writeable.c +++ b/cdb/writeable.c @@ -75,7 +75,7 @@ typedef struct HashValue { static HashValue *htv_prep(int len) { HashValue *hd; - hd= TALLOC((hd->data - (Byte*)hd) + len); + hd= TALLOC(offsetof(typeof(*hd), data) + len); hd->len= len; return hd; }